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 c8bdd6c commit fa453cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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');
}
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 fa453cc

Please sign in to comment.