Modified server to use while loop. Server can handle client disconnects without crashing.