made the deferred stuff in both the goroutines not panic if they try to close things that are already closed - this was much simpler than keeping state in sync to not double close... after all, the socket can break in many ways, and the channels can be closed externally etc.