Skip to content

Commit e816d05

Browse files
committed
SO_REUSEPORT
1 parent 21bfb96 commit e816d05

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/VerifierServer/Server.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,15 @@ private function __initReactHttpServer(?LoopInterface $loop = null): void
180180
: Loop::get(),
181181
fn($request) => $this->handleReact($request)
182182
)->on('error', fn(Throwable $e) => $this->logError($e, true));
183-
$this->socket = new SocketServer("{$this->addr}:{$this->port}", [], $this->loop);
183+
$this->socket = new SocketServer(
184+
"{$this->addr}:{$this->port}",
185+
[
186+
'tcp' => [
187+
'so_reuseport' => true
188+
]
189+
],
190+
$this->loop
191+
);
184192
}
185193

186194
/**

0 commit comments

Comments
 (0)