Skip to content

Commit aec588f

Browse files
authored
Properly unreference socket in order to avoid FIN_WAIT2
1 parent df07f78 commit aec588f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Rfc6455Endpoint.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ private function tryAppOnClose($code, $reason) {
124124

125125
private function unloadClient() {
126126
$this->parser = null;
127+
$this->socket = null;
127128
if ($this->readWatcher) {
128129
\Amp\cancel($this->readWatcher);
129130
}
@@ -698,4 +699,4 @@ static public function parser(callable $emitCallback, array $options = []) {
698699
yield 0;
699700
}
700701
}
701-
}
702+
}

0 commit comments

Comments
 (0)