Skip to content

Conversation

pin
Copy link
Owner

@pin pin commented Sep 7, 2025

This is a follow-up on #101 which fixes the real problem: Shutdown does not work in single-port mode. It is deliberate so we don't drop in-progress transfers on the floor when shutdown is called.

Still, we want Shutdown to work. This PR does two things:

  1. Adds TestShutdownDuringTransfer test that starts a transfer and then calls Shutdown. It expects that shutdown succeeds and ongoing transfer still succeed too. Of course, it is opinionated question if we actually want graceful shutdown in the first place, and it probably would be good to have a Shutdown variant which does drops all on the floor and stops. But that is for later.
  2. Fixes single_port.go so that the behavior of single-port server matches the behavior of the regular server. On Shutdown, stop accepting new transfer, but finish the existing ones, then exit.

@pin pin mentioned this pull request Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant