Skip to content

Commit 58de4db

Browse files
committed
Also ignore close on connection when it's already closed
1 parent 64b0b9e commit 58de4db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PhpAmqpLib/Connection/AbstractConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,8 @@ public function channel($channel_id = null)
606606
*/
607607
public function close($reply_code = 0, $reply_text = "", $method_sig = array(0, 0))
608608
{
609-
if (!$this->protocolWriter) {
610-
return;
609+
if (!$this->protocolWriter || !$this->isConnected()) {
610+
return NULL;
611611
}
612612

613613
list($class_id, $method_id, $args) = $this->protocolWriter->connectionClose(

0 commit comments

Comments
 (0)