retry closing sockets