mirror of
https://github.com/danog/ipc.git
synced 2024-11-26 20:15:05 +01:00
Weird fix
This commit is contained in:
parent
d769b163ca
commit
6bbd35f057
@ -95,10 +95,11 @@ class IpcServer
|
|||||||
$errors[$type] = "could not connect to the FIFO socket: $error";
|
$errors[$type] = "could not connect to the FIFO socket: $error";
|
||||||
} else {
|
} else {
|
||||||
$listenUri = $type === self::TYPE_TCP ? "tcp://127.0.0.1:0" : "unix://".$uri;
|
$listenUri = $type === self::TYPE_TCP ? "tcp://127.0.0.1:0" : "unix://".$uri;
|
||||||
|
$errno = -1;
|
||||||
|
$errstr = 'no error';
|
||||||
try {
|
try {
|
||||||
$this->server = \stream_socket_server($listenUri, $errno, $errstr, \STREAM_SERVER_BIND | \STREAM_SERVER_LISTEN);
|
$this->server = \stream_socket_server($listenUri, $errno, $errstr, \STREAM_SERVER_BIND | \STREAM_SERVER_LISTEN);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$errno = -1;
|
|
||||||
$errstr = "exception: $e";
|
$errstr = "exception: $e";
|
||||||
}
|
}
|
||||||
if ($this->server) {
|
if ($this->server) {
|
||||||
|
Loading…
Reference in New Issue
Block a user