Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 614051f

Browse files
authored
Merge pull request repejota#91 from dfeyer/patch-3
TASK: Close should check if the current socket is null
2 parents 82a139b + b089351 commit 614051f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Nats/Connection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,9 @@ public function setChunkSize($chunkSize)
495495
*/
496496
public function close()
497497
{
498+
if ($this->streamSocket === null) {
499+
return;
500+
}
498501
fclose($this->streamSocket);
499502
$this->streamSocket = null;
500503
}

0 commit comments

Comments
 (0)