Made sure the socket resetting doesn't kill the program