| @@ 106-116 (lines=11) @@ | ||
| 103 | /** |
|
| 104 | * @inheritdoc |
|
| 105 | */ |
|
| 106 | public function disconnect() |
|
| 107 | { |
|
| 108 | try { |
|
| 109 | $host = $this->location->getHost(); |
|
| 110 | $port = $this->location->getPort(); |
|
| 111 | ||
| 112 | $this->socket->disconnect("tcp://{$host}:{$port}"); |
|
| 113 | } catch (Exception $exception) { |
|
| 114 | // TODO: find an elegant way to deal with this |
|
| 115 | } |
|
| 116 | } |
|
| 117 | ||
| 118 | public function __destruct() |
|
| 119 | { |
|
| @@ 175-187 (lines=13) @@ | ||
| 172 | /** |
|
| 173 | * @inheritdoc |
|
| 174 | */ |
|
| 175 | public function disconnect() |
|
| 176 | { |
|
| 177 | if ($this->socket) { |
|
| 178 | try { |
|
| 179 | $host = $this->location->getHost(); |
|
| 180 | $port = $this->location->getPort(); |
|
| 181 | ||
| 182 | $this->socket->disconnect("tcp://{$host}:{$port}"); |
|
| 183 | } catch (Exception $exception) { |
|
| 184 | // TODO: find an elegant way to deal with this |
|
| 185 | } |
|
| 186 | } |
|
| 187 | } |
|
| 188 | ||
| 189 | public function __destruct() |
|
| 190 | { |
|