Clean up the test code for client disconnection.