From fa453cc0fc8b4aa6f2b01c010dc29dede7af3c48 Mon Sep 17 00:00:00 2001 From: walkor Date: Tue, 7 Feb 2017 13:01:37 +0800 Subject: [PATCH] Fix --- src/Socket.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Socket.php b/src/Socket.php index 0876efe..36e746b 100644 --- a/src/Socket.php +++ b/src/Socket.php @@ -98,8 +98,8 @@ 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'); @@ -107,7 +107,7 @@ public function emit($ev = null) 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'])) {