Skip to content

Commit

Permalink
Enable TCP_NODELAY
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Jan 20, 2019
1 parent 533a4e3 commit 1e001f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Internal/Rfc6455Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ public function reapClient(
$this->clients[$client->id] = $client;
$this->heartbeatTimeouts[$client->id] = $this->now + $this->heartbeatPeriod;

Promise\rethrow(new Coroutine($this->tryAppOnOpen($client->id, $request)));
\stream_context_set_option($socket->getResource(), 'socket', 'tcp_nodelay', true);

Promise\rethrow(new Coroutine($this->tryAppOnOpen($client->id, $request)));
Promise\rethrow(new Coroutine($this->read($client)));

return $client;
Expand Down

0 comments on commit 1e001f9

Please sign in to comment.