Server rebinding to same address behaviour #2636
Replies: 2 comments 1 reply
-
With graceful shutdown, once you trigger it, the listener will be stopped (so unbound), and it will be waiting for any spawned connections to finish. That's useful to know that the process can close cleanly without disrupting any connected clients. If wanting to rebind that address, you can do so after triggering the graceful shutdown. You might not be able to do so immediately, as the kernel may reserve it for some time. You could also look into binding your own |
Beta Was this translation helpful? Give feedback.
-
Couldn't your |
Beta Was this translation helpful? Give feedback.
-
What I a trying to do is similar to this:
So, I want to rebind an address to a Server with a different request handler once an event occurs, a timeout in this example. I am aware of this approach:
How long can the commented line run for? Does it wait for all of request handler tasks to join? Can I let the hanging request handles run while migrating to a new Server? What I basically need is an ability to unbind the Server from the listening socket. What can I do with the current Hyper version that would be the best approximation of that?
Beta Was this translation helpful? Give feedback.
All reactions