... unless ($client = $lsn->accept) { tprint ("Could not connect to socket: " . $!); next; } if( threads::list( threads::running >= 100 ) { $client->shutdown( 2 ); $client->close; tprint( "Client $client rejected; too many concurrent clients." ); next; } ...