Hopefully, should avoid the case where we delete sockets multiple times.
Forgot to keep track of connection phase number.
Updated test: reading no data is way to determine that connection has closed.
Signalling to stop listening with pipes.
Had race condition, where, because of threading issues, could try to bring up multiple connections when a connection went down.  Fixed.