From 8d01549c48c0cf26a6d1fd3f11529127463b32d8 Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Tue, 6 Jul 2021 20:09:19 +0200 Subject: [PATCH 1/9] Bumped VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index fd2a018..94ff29c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.0 +3.1.1 From 7c698226d9fb8bd2512601122b6813f4329da847 Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Tue, 6 Jul 2021 20:08:19 +0200 Subject: [PATCH 2/9] Fixed serverside initiated disconnects sometimes causing inconsistent results --- src/PHPWebSockets/AConnection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PHPWebSockets/AConnection.php b/src/PHPWebSockets/AConnection.php index 5efd816..3bdf198 100644 --- a/src/PHPWebSockets/AConnection.php +++ b/src/PHPWebSockets/AConnection.php @@ -540,10 +540,10 @@ protected function _handlePacket(string $newData) : \Generator { $this->_isClosed = TRUE; - $this->close(); - yield new Update\Read(Update\Read::C_SOCK_DISCONNECT, $this); + $this->close(); + } elseif (!$this->_weSentDisconnect) { $this->_log(LogLevel::DEBUG, ' Remote initiated the disconnect, echo disconnect'); From 3e2faf9de9afb30f5d5a7dfdbfa567ac8556ad87 Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Tue, 6 Jul 2021 20:43:09 +0200 Subject: [PATCH 3/9] Updated license date --- src/PHPWebSockets.php | 2 +- src/PHPWebSockets/AConnection.php | 2 +- src/PHPWebSockets/AUpdate.php | 2 +- src/PHPWebSockets/BasicLogger.php | 2 +- src/PHPWebSockets/Client.php | 2 +- src/PHPWebSockets/Framer.php | 2 +- src/PHPWebSockets/IStreamContainer.php | 2 +- src/PHPWebSockets/ITaggable.php | 2 +- src/PHPWebSockets/Server.php | 2 +- src/PHPWebSockets/Server/AcceptingConnection.php | 2 +- src/PHPWebSockets/Server/Connection.php | 2 +- src/PHPWebSockets/TLogAware.php | 2 +- src/PHPWebSockets/TStreamContainerDefaults.php | 2 +- src/PHPWebSockets/Update/Error.php | 2 +- src/PHPWebSockets/Update/Read.php | 2 +- src/PHPWebSockets/UpdatesWrapper.php | 2 +- tests/ClientTest.php | 2 +- tests/ServerTest.php | 2 +- tests/UpdatesWrapperTest.php | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/PHPWebSockets.php b/src/PHPWebSockets.php index 4dc3553..7cd9c3f 100755 --- a/src/PHPWebSockets.php +++ b/src/PHPWebSockets.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/AConnection.php b/src/PHPWebSockets/AConnection.php index 3bdf198..7bd7f6a 100644 --- a/src/PHPWebSockets/AConnection.php +++ b/src/PHPWebSockets/AConnection.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/AUpdate.php b/src/PHPWebSockets/AUpdate.php index 6037724..e5a8991 100644 --- a/src/PHPWebSockets/AUpdate.php +++ b/src/PHPWebSockets/AUpdate.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/BasicLogger.php b/src/PHPWebSockets/BasicLogger.php index a1a5208..fe1c624 100644 --- a/src/PHPWebSockets/BasicLogger.php +++ b/src/PHPWebSockets/BasicLogger.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/Client.php b/src/PHPWebSockets/Client.php index b4450d7..e17aa71 100644 --- a/src/PHPWebSockets/Client.php +++ b/src/PHPWebSockets/Client.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/Framer.php b/src/PHPWebSockets/Framer.php index f9f285e..0fad302 100644 --- a/src/PHPWebSockets/Framer.php +++ b/src/PHPWebSockets/Framer.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/IStreamContainer.php b/src/PHPWebSockets/IStreamContainer.php index f932acb..1fac40c 100644 --- a/src/PHPWebSockets/IStreamContainer.php +++ b/src/PHPWebSockets/IStreamContainer.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/ITaggable.php b/src/PHPWebSockets/ITaggable.php index c66eeff..50b9554 100644 --- a/src/PHPWebSockets/ITaggable.php +++ b/src/PHPWebSockets/ITaggable.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/Server.php b/src/PHPWebSockets/Server.php index 1a94721..49e4b97 100644 --- a/src/PHPWebSockets/Server.php +++ b/src/PHPWebSockets/Server.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/Server/AcceptingConnection.php b/src/PHPWebSockets/Server/AcceptingConnection.php index 9f1e2e1..8b5f7d8 100644 --- a/src/PHPWebSockets/Server/AcceptingConnection.php +++ b/src/PHPWebSockets/Server/AcceptingConnection.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/Server/Connection.php b/src/PHPWebSockets/Server/Connection.php index e58d541..2521e94 100644 --- a/src/PHPWebSockets/Server/Connection.php +++ b/src/PHPWebSockets/Server/Connection.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/TLogAware.php b/src/PHPWebSockets/TLogAware.php index d2bb690..6fb36d3 100644 --- a/src/PHPWebSockets/TLogAware.php +++ b/src/PHPWebSockets/TLogAware.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/TStreamContainerDefaults.php b/src/PHPWebSockets/TStreamContainerDefaults.php index 61a89e2..1e66f73 100644 --- a/src/PHPWebSockets/TStreamContainerDefaults.php +++ b/src/PHPWebSockets/TStreamContainerDefaults.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/Update/Error.php b/src/PHPWebSockets/Update/Error.php index d251231..d26f6b2 100644 --- a/src/PHPWebSockets/Update/Error.php +++ b/src/PHPWebSockets/Update/Error.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/Update/Read.php b/src/PHPWebSockets/Update/Read.php index 0644002..b85cda9 100644 --- a/src/PHPWebSockets/Update/Read.php +++ b/src/PHPWebSockets/Update/Read.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/PHPWebSockets/UpdatesWrapper.php b/src/PHPWebSockets/UpdatesWrapper.php index 0cd8840..6feaf18 100644 --- a/src/PHPWebSockets/UpdatesWrapper.php +++ b/src/PHPWebSockets/UpdatesWrapper.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/tests/ClientTest.php b/tests/ClientTest.php index a9d7e2b..1e10e3e 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 1283d01..8d0744f 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/tests/UpdatesWrapperTest.php b/tests/UpdatesWrapperTest.php index 3afeb6e..da30267 100644 --- a/tests/UpdatesWrapperTest.php +++ b/tests/UpdatesWrapperTest.php @@ -6,7 +6,7 @@ * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - * The MIT License (MIT) * - * Copyright (c) 2020 Kevin Meijer + * Copyright (c) 2021 Kevin Meijer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal From 3aca77f27513c3fa541566136d86b9aed1a2c02a Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Tue, 6 Jul 2021 20:45:06 +0200 Subject: [PATCH 4/9] Added license --- tests/Helpers/client.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/Helpers/client.php b/tests/Helpers/client.php index 1d62dc5..6ce6c54 100755 --- a/tests/Helpers/client.php +++ b/tests/Helpers/client.php @@ -3,6 +3,32 @@ declare(strict_types = 1); +/* + * - - - - - - - - - - - - - BEGIN LICENSE BLOCK - - - - - - - - - - - - - + * The MIT License (MIT) + * + * Copyright (c) 2021 Kevin Meijer + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * - - - - - - - - - - - - - - END LICENSE BLOCK - - - - - - - - - - - - - + */ + require_once __DIR__ . '/../../vendor/autoload.php'; $cliArgs = [ From af841950392cf3a8b2e0cf73ee24950d719aaf65 Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Wed, 7 Jul 2021 08:07:42 +0200 Subject: [PATCH 5/9] Fixed PHPDocs --- src/PHPWebSockets/AConnection.php | 6 +++--- src/PHPWebSockets/IStreamContainer.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PHPWebSockets/AConnection.php b/src/PHPWebSockets/AConnection.php index 7bd7f6a..3246625 100644 --- a/src/PHPWebSockets/AConnection.php +++ b/src/PHPWebSockets/AConnection.php @@ -131,7 +131,7 @@ abstract class AConnection implements IStreamContainer, LoggerAwareInterface, IT /** * The timestamp since when this connection has been opened * - * @var int + * @var float|null */ protected $_openedTimestamp = NULL; @@ -215,7 +215,7 @@ abstract class AConnection implements IStreamContainer, LoggerAwareInterface, IT /** * The resource stream * - * @var resource + * @var resource|null */ protected $_stream = NULL; @@ -859,7 +859,7 @@ public function setNewMessageStreamCallback(callable $callable = NULL) : void { /** * Returns the stream object for this connection * - * @return resource + * @return resource|null */ public function getStream() { return $this->_stream; diff --git a/src/PHPWebSockets/IStreamContainer.php b/src/PHPWebSockets/IStreamContainer.php index 1fac40c..4056321 100644 --- a/src/PHPWebSockets/IStreamContainer.php +++ b/src/PHPWebSockets/IStreamContainer.php @@ -76,7 +76,7 @@ public function handleRead() : \Generator; /** * Returns the stream object for this connection * - * @return resource + * @return resource|null */ public function getStream(); From d9b7e82327506d3454cd6c1bdd1f3715c32371d8 Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Wed, 7 Jul 2021 08:08:05 +0200 Subject: [PATCH 6/9] Fixed potential crash --- src/PHPWebSockets/AConnection.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/PHPWebSockets/AConnection.php b/src/PHPWebSockets/AConnection.php index 3246625..2978d84 100644 --- a/src/PHPWebSockets/AConnection.php +++ b/src/PHPWebSockets/AConnection.php @@ -717,7 +717,18 @@ public function writeMultiFramed(string $data, int $opcode = \PHPWebSockets::OPC throw new \LogicException('FrameSize should be at least 1'); } - $frames = str_split($data, $frameSize); + $dataLen = strlen($data); + if (strlen($data) > $frameSize) { + + $frames = str_split($data, $frameSize); + if ($frames === FALSE) { + throw new \UnexpectedValueException('Unable to split ' . $dataLen . ' bytes into frames of ' . $frameSize . ' bytes'); + } + + } else { + $frames = [$data]; + } + end($frames); $lastKey = key($frames); From a3f61774548ef5f5ae468f25faa1175091f55ae2 Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Wed, 7 Jul 2021 08:08:53 +0200 Subject: [PATCH 7/9] Added an exception if attempting to write to a closed connection --- src/PHPWebSockets/AConnection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PHPWebSockets/AConnection.php b/src/PHPWebSockets/AConnection.php index 2978d84..4766492 100644 --- a/src/PHPWebSockets/AConnection.php +++ b/src/PHPWebSockets/AConnection.php @@ -768,6 +768,10 @@ protected function _getStreamForNewMessage(array $headers) { */ public function writeRaw(string $data, bool $priority) : void { + if (!$this->isOpen()) { + throw new \LogicException('Unable to write: Connection is closed'); + } + if ($priority) { $this->_priorityFramesBuffer[] = $data; } else { From adfffe5ec78f063e3838850dcc6ac608b4ab95a2 Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Wed, 7 Jul 2021 08:09:26 +0200 Subject: [PATCH 8/9] Added a clear and reset to AConnection on close to redunce memory usage --- src/PHPWebSockets/AConnection.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/PHPWebSockets/AConnection.php b/src/PHPWebSockets/AConnection.php index 4766492..4bfae78 100644 --- a/src/PHPWebSockets/AConnection.php +++ b/src/PHPWebSockets/AConnection.php @@ -975,10 +975,31 @@ public function close() : void { $this->_isClosed = TRUE; if (is_resource($this->_stream)) { - fclose($this->_stream); + + $stream = $this->_stream; $this->_stream = NULL; + + fclose($stream); + } + // To prevent the warning that there was still data to write + $this->_clearBuffers(); + $this->_resetFrameData(); + + } + + /** + * Clears all buffers + */ + private function _clearBuffers() : void { + + $this->_currentFrameRemainingBytes = 0; + $this->_priorityFramesBuffer = []; + $this->_framesBuffer = []; + $this->_writeBuffer = NULL; + $this->_readBuffer = NULL; + } /** From 4469bb6ff000c8dc0277ded86ca4aeed1510f1ae Mon Sep 17 00:00:00 2001 From: Kevin Meijer Date: Wed, 7 Jul 2021 08:50:56 +0200 Subject: [PATCH 9/9] More fixes --- src/PHPWebSockets/AConnection.php | 3 ++- src/PHPWebSockets/UpdatesWrapper.php | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/PHPWebSockets/AConnection.php b/src/PHPWebSockets/AConnection.php index 4bfae78..051a904 100644 --- a/src/PHPWebSockets/AConnection.php +++ b/src/PHPWebSockets/AConnection.php @@ -478,9 +478,10 @@ protected function _handlePacket(string $newData) : \Generator { if ($res === FALSE) { - $this->close(); yield new Update\Error(Update\Error::C_WRITE_INVALID_TARGET_STREAM, $this); + $this->close(); + } } else { diff --git a/src/PHPWebSockets/UpdatesWrapper.php b/src/PHPWebSockets/UpdatesWrapper.php index 6feaf18..686a0a3 100644 --- a/src/PHPWebSockets/UpdatesWrapper.php +++ b/src/PHPWebSockets/UpdatesWrapper.php @@ -535,7 +535,6 @@ private function _onInvalidPayload(Update\Error $update) : void { $source = $update->getSourceConnection(); $this->_triggerErrorHandler($source, $update->getCode()); - $this->_triggerDisconnectHandler($source, FALSE, NULL); $this->_handledDisconnects[$source->getResourceIndex()] = TRUE; @@ -561,7 +560,6 @@ private function _onProtocolError(Update\Error $update) : void { $source = $update->getSourceConnection(); $this->_triggerErrorHandler($source, $update->getCode()); - $this->_triggerDisconnectHandler($source, FALSE, NULL); $this->_handledDisconnects[$source->getResourceIndex()] = TRUE; @@ -572,7 +570,6 @@ private function _onInvalidRSVBit(Update\Error $update) : void { $source = $update->getSourceConnection(); $this->_triggerErrorHandler($source, $update->getCode()); - $this->_triggerDisconnectHandler($source, FALSE, NULL); $this->_handledDisconnects[$source->getResourceIndex()] = TRUE; @@ -587,7 +584,6 @@ private function _acceptTimeoutPassed(Update\Error $update) : void { $source = $update->getSourceConnection(); $this->_triggerErrorHandler($source, $update->getCode()); - $this->_triggerDisconnectHandler($source, FALSE, NULL); $this->_handledDisconnects[$source->getResourceIndex()] = TRUE;