keep track of whether sockets are closed