]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/commitdiff
This fix-for-endless-exception used <1ms while it should use <1s.
authorBram Matthys <redacted>
Thu, 27 Apr 2023 18:36:09 +0000 (20:36 +0200)
committerBram Matthys <redacted>
Thu, 27 Apr 2023 18:36:09 +0000 (20:36 +0200)
Also, I wonder if the fix is still needed as i (accidentally)
updated the websocket library today.

I'm getting:
PHP Fatal error:  Uncaught WebSocket\\TimeoutException: Client read timeout in
..etc..

lib/Connection.php

index bcd38d168be1b6dbeab2efff9c4c5c992a810cd4..ed64c3bcc06150f30173167d7fc36b2dbc28cb00 100644 (file)
@@ -119,7 +119,7 @@ class Connection
         try {
             $reply = $this->connection->receive();
         } catch (WebSocket\TimeoutException $e) {
-            if (microtime(true) - $starttime < 1)
+            if (microtime(true) - $starttime < 1000)
             {
                 /* There's some bug in the library: if we
                  * caught the timeout exception once (so