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 a909e72 commit d2575a2
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 @@ -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([]);
}
Expand Down Expand Up @@ -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([]);
}
Expand Down

0 comments on commit d2575a2

Please sign in to comment.