Skip to content

Commit 84373ab

Browse files
committed
fixed always true condition
------ --------------------------------- Line Client.php ------ --------------------------------- 362 Left side of && is always true. 370 If condition is always true.
1 parent 2ceb020 commit 84373ab

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Client.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,15 @@ public function readFrame()
359359
public function disconnect($sync = false)
360360
{
361361
try {
362-
if ($this->connection && $this->connection->isConnected()) {
362+
if ($this->connection->isConnected()) {
363363
if ($this->protocol) {
364364
$this->sendFrame($this->protocol->getDisconnectFrame(), $sync);
365365
}
366366
}
367367
} catch (StompException $ex) {
368368
// nothing!
369369
}
370-
if ($this->connection) {
371-
$this->connection->disconnect();
372-
}
370+
$this->connection->disconnect();
373371

374372
$this->sessionId = null;
375373
$this->unprocessedFrames = [];

0 commit comments

Comments
 (0)