onClose($this->getSocket()); if ($ret instanceof CommandInterface) { $comp = new Composite; $comp->enqueue($ret); $rt = new Runtime($this->getSocket()); $rt->setCommand(function(SocketInterface $socket, ObserverInterface $scope) { $socket->close(); }); $comp->enqueue($rt); return $comp; } $this->getSocket()->close(); } }