From a909e726152455bb4a32df33d047ffcbcae3050d Mon Sep 17 00:00:00 2001 From: Mike Row <47996463+mikerow@users.noreply.github.com> Date: Sat, 4 Jul 2020 15:19:11 +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 65392ef..162db1b 100644 --- a/src/NanoIPC.php +++ b/src/NanoIPC.php @@ -49,21 +49,21 @@ public function __construct(string $transport_type, array $params) } // Timeout - if (isset($params['timeout'])) { + if (isset($params['options']['timeout'])) { $this->timeout = (float) $params['timeout']; } else { $this->timeout = 15; } // Flags - if (isset($params['flags'])) { + if (isset($params['options']['flags'])) { $this->flags = (int) $params['flags']; } else { $this->flags = STREAM_CLIENT_CONNECT; } // Context - if (isset($params['context']) && is_array($params['context'])) { + if (isset($params['options']['context']) && is_array($params['options']['context'])) { $this->context = stream_context_create($params['context']); } else { $this->context = stream_context_create([]); @@ -93,21 +93,21 @@ public function __construct(string $transport_type, array $params) } // Timeout - if (isset($params['timeout'])) { + if (isset($params['options']['timeout'])) { $this->timeout = (float) $params['timeout']; } else { $this->timeout = 15; } // Flags - if (isset($params['flags'])) { + if (isset($params['options']['flags'])) { $this->flags = (int) $params['flags']; } else { $this->flags = STREAM_CLIENT_CONNECT; } // Context - if (isset($params['context']) && is_array($params['context'])) { + if (isset($params['options']['context']) && is_array($params['options']['context'])) { $this->context = stream_context_create($params['context']); } else { $this->context = stream_context_create([]);