From d2575a282f1e036714e654a0d65553703a990b5e Mon Sep 17 00:00:00 2001 From: Mike Row <47996463+mikerow@users.noreply.github.com> Date: Sat, 4 Jul 2020 15:22:09 +0200 Subject: [PATCH] Update NanoIPC.php --- src/NanoIPC.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/NanoIPC.php b/src/NanoIPC.php index 162db1b..c90d41e 100644 --- a/src/NanoIPC.php +++ b/src/NanoIPC.php @@ -50,21 +50,21 @@ public function __construct(string $transport_type, array $params) // Timeout if (isset($params['options']['timeout'])) { - $this->timeout = (float) $params['timeout']; + $this->timeout = (float) $params['options']['timeout']; } else { $this->timeout = 15; } // Flags if (isset($params['options']['flags'])) { - $this->flags = (int) $params['flags']; + $this->flags = (int) $params['options']['flags']; } else { $this->flags = STREAM_CLIENT_CONNECT; } // Context if (isset($params['options']['context']) && is_array($params['options']['context'])) { - $this->context = stream_context_create($params['context']); + $this->context = stream_context_create($params['options']['context']); } else { $this->context = stream_context_create([]); } @@ -94,21 +94,21 @@ public function __construct(string $transport_type, array $params) // Timeout if (isset($params['options']['timeout'])) { - $this->timeout = (float) $params['timeout']; + $this->timeout = (float) $params['options']['timeout']; } else { $this->timeout = 15; } // Flags if (isset($params['options']['flags'])) { - $this->flags = (int) $params['flags']; + $this->flags = (int) $params['options']['flags']; } else { $this->flags = STREAM_CLIENT_CONNECT; } // Context if (isset($params['options']['context']) && is_array($params['options']['context'])) { - $this->context = stream_context_create($params['context']); + $this->context = stream_context_create($params['options']['context']); } else { $this->context = stream_context_create([]); }