close sockets from the reactor thread