Resolve #3 by not closing the channel until properly disconnected.