Close active drains

This fixes a problem where the drain socket was closed prematurely before the `disconnecting` state--it shouldn't be closed until we are actually transitioning to the `disconnected` state.