Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Commit

Permalink
Update NanoIPC.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRow committed Jul 4, 2020
1 parent bd9a599 commit a909e72
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/NanoIPC.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([]);
Expand Down Expand Up @@ -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([]);
Expand Down

0 comments on commit a909e72

Please sign in to comment.