From 45a4252c266817b74906f730a95911bed35b3b9d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 22 Jan 2019 22:11:32 +0000 Subject: [PATCH] RCON: Explicitly specify connection backlog size, fixes #2685 I believe this is caused by a bug in the linux kernel, since it only impacts certain machines I tested (one, to be specific). Whatever the case, setting a max backlog size is prudent anyway, and fixes the problem. --- src/pocketmine/network/rcon/RCON.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/network/rcon/RCON.php b/src/pocketmine/network/rcon/RCON.php index b1df366c5..01e14043e 100644 --- a/src/pocketmine/network/rcon/RCON.php +++ b/src/pocketmine/network/rcon/RCON.php @@ -74,7 +74,7 @@ class RCON{ $this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); - if($this->socket === false or !@socket_bind($this->socket, $interface, $port) or !@socket_listen($this->socket)){ + if($this->socket === false or !@socket_bind($this->socket, $interface, $port) or !@socket_listen($this->socket, 5)){ throw new \RuntimeException(trim(socket_strerror(socket_last_error()))); }