Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor authored Feb 7, 2017
1 parent f2d4127 commit 4430a2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ public function emit($ev = null)
$packet['data'] = $args;
$flags = $this->flags;
// access last argument to see if it's an ACK callback
//if (is_callable(end($args)))
//{
if (is_callable(end($args)))
{
if ($this->_rooms || isset($flags['broadcast']))
{
throw new Exception('Callbacks are not supported when broadcasting');
throw new \Exception('Callbacks are not supported when broadcasting');
}
echo('emitting packet with ack id ' . $this->nsp->ids);
$this->acks[$this->nsp->ids] = array_pop($args);
$packet['id'] = $this->nsp->ids++;
//}
}

if ($this->_rooms || !empty($flags['broadcast']))
{
Expand Down

0 comments on commit 4430a2d

Please sign in to comment.