Fix a panic when a close() is executed without a bind() on a socket.