Server now closes socket when client disconnects