prevent dead sockets from crashing server