Skip to content

Commit

Permalink
Fix undefined variable status_bin
Browse files Browse the repository at this point in the history
  • Loading branch information
pmccarren committed Apr 17, 2015
1 parent 4d33766 commit 95167fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,11 @@ public function receive() {
$status = bindec(sprintf("%08b%08b", ord($payload[0]), ord($payload[1])));
$this->close_status = $status;
$payload = substr($payload, 2);

if (!$this->is_closing) $this->send($status_bin . 'Close acknowledged: ' . $status, 'close', true); // Respond.
}

if ($this->is_closing) $this->is_closing = false; // A close response, all done.
else $this->send($status_bin . 'Close acknowledged: ' . $status, 'close', true); // Respond.

// And close the socket.
fclose($this->socket);
Expand Down

0 comments on commit 95167fc

Please sign in to comment.