- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.7k
Closed
Labels
A-serverArea: server.Area: server.B-rfcBlocked: More comments would be useful in determine next steps.Blocked: More comments would be useful in determine next steps.
Description
After spawning a server on a tokio Runtime, then shutting down the runtime (using shutdown_now), recreating a server on the same IP and port with a new Runtime panics, claiming
error creating server listener: Only one usage of each socket address (protocol/network address/port) is normally permitted. (os error 10048)
If I instead recreate the server by restarting the process, it works fine.
This behaviour is being observed on Windows 7. I have tried sleeping the thread for up to 10 seconds before recreating the server and the same error occurs.
Other than shutting down the Runtime, is there something else I must do to cleanly close a server? The documentation mentions the concept of "shutdown" in passing, but does not elaborate on what must be done to achieve that correctly.
Metadata
Metadata
Assignees
Labels
A-serverArea: server.Area: server.B-rfcBlocked: More comments would be useful in determine next steps.Blocked: More comments would be useful in determine next steps.