mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-21 10:26:38 +00:00
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.
This commit is contained in:
parent
feaaa925a7
commit
45a4252c26
@ -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())));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user