Prevent sockets from closing