debug("Closing connection"); shutdown($client, 2); close $client; threads->exit;