Skip to content

Commit

Permalink
Deleted useless timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Nov 6, 2019
1 parent 911d2f0 commit f491612
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nats/src/Driver/NatsDriver.php
Expand Up @@ -74,14 +74,15 @@ public function request(string $subject, $payload, Closure $callback)
}
}

public function requestSync(string $subject, $payload, float $timeout = 10.0): Message
public function requestSync(string $subject, $payload): Message
{
try {
/** @var Connection $connection */
$connection = $this->pool->get();
/** @var NatsConnection $client */
$client = $connection->getConnection();
$channel = new Channel(1);
$timeout = floatval($this->config['timeout'] ?? 1.0);
$client->request($subject, $payload, function (Message $message) use ($channel) {
$channel->push($message);
});
Expand Down

0 comments on commit f491612

Please sign in to comment.