function removeWorkerSocket(\CharlotteDunois\Phoebe\Worker $worker) {
        $stream = $this->streams->get($worker->id);
        if($stream !== null) {
            $this->streams->delete($worker->id);
            $stream->close();
            
            $socket = $worker->getSocket();
            if($socket !== null) {
                $worker->setSocket(null);
                
                $sock = $socket->getPoolSocket();
                $boot = $socket->getWorkerSocket();
                
                if(\is_resource($sock)) {
                    @\socket_shutdown($sock, 2);
                    \socket_close($sock);
                }
                
                if(\is_resource($boot)) {
                    @\socket_shutdown($boot, 2);
                    \socket_close($boot);
                }
            }
        }
    }
function removeWorkerSocket(\CharlotteDunois\Phoebe\Worker $worker) {
        $stream = $this->streams->get($worker->id);
        if($stream !== null) {
            $this->streams->delete($worker->id);
            $stream->close();
            
            $socket = $worker->getSocket();
            if($socket !== null) {
                $worker->setSocket(null);
                
                $sock = $socket->getPoolSocket();
                $boot = $socket->getWorkerSocket();
                
                if(\is_resource($sock)) {
                    @\socket_shutdown($sock, 2);
                    \socket_close($sock);
                }
                
                if(\is_resource($boot)) {
                    @\socket_shutdown($boot, 2);
                    \socket_close($boot);
                }
            }
        }
    }
function removeWorkerSocket ( \ CharlotteDunois \ Phoebe \ Worker $ worker ) { $ stream = $ this -> streams -> get ( $ worker -> id ) ; if ( $ stream !== null ) { $ this -> streams -> delete ( $ worker -> id ) ; $ stream -> close ( ) ; $ socket = $ worker -> getSocket ( ) ; if ( $ socket !== null ) { $ worker -> setSocket ( null ) ; $ sock = $ socket -> getPoolSocket ( ) ; $ boot = $ socket -> getWorkerSocket ( ) ; if ( \ is_resource ( $ sock ) ) { @ \ socket_shutdown ( $ sock , 2 ) ; \ socket_close ( $ sock ) ; } if ( \ is_resource ( $ boot ) ) { @ \ socket_shutdown ( $ boot , 2 ) ; \ socket_close ( $ boot ) ; } } } }
Removes the ResourceSocket of the worker.
@param \CharlotteDunois\Phoebe\Worker  $worker
@return void
Removes the ResourceSocket of the worker .