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([]); }