Skip to content

Commit

Permalink
[Socket] Buffer fix
Browse files Browse the repository at this point in the history
Removed the option for output buffer chunk size, use defaults
Removed the unit test that check specific string on error
Unit test just checks an exception was thrown on an invalid write
  • Loading branch information
cboden committed Jun 17, 2012
1 parent 957a966 commit 10a311e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Buffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class Buffer extends EventEmitter
public $socket;
public $closed = false;
public $listening = false;
public $chunkSize = 4096;
private $loop;
private $data = '';

Expand Down Expand Up @@ -46,7 +45,7 @@ public function end()

public function handleWrite()
{
$sent = @fwrite($this->socket, $this->data, $this->chunkSize);
$sent = @fwrite($this->socket, $this->data);

if (false === $sent) {
$this->emit('error', array(new \RuntimeException('Unable to write to socket')));
Expand Down

0 comments on commit 10a311e

Please sign in to comment.