Closed whyrusleeping closed 8 years ago
Yes, I think it should remain open until Close is called. Perhaps there could be a CloseAfterConns
which will cause Close to happen after the last connection closes.
Sounds like an oversight on my part. Overzealous refactoring. I'll address it in a few hours.
Fixed by 5341f3c935837fd4351011fefd73f703d865380e
If i create a socket for accepting new connections on, I want to keep that open even if all the connections that have been made to me get closed, That expectation is violated by this line: https://github.com/anacrolix/utp/blob/master/utp.go#L1252
I think that line only needs to be executed if the connections drop to zero AND the socket was created through a 'dial' (or even then probably not). Its probably the case that the right thing to do is to only close the actual socket when 'Close' is called.