Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ArrayPort should only send each beginGroup once.

  • Loading branch information...
commit 2630e6670aaed7525f574b1d5b17f7c4486b4451 1 parent aad7c76
@rybesh authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/lib/ArrayPort.coffee
View
6 src/lib/ArrayPort.coffee
@@ -12,7 +12,7 @@ class ArrayPort extends port.Port
if socketId is null
@sockets.forEach (socket) ->
socket.disconnect()
- return
+ return
unless @sockets[socketId]
throw new Error "No socket '#{socketId}' available"
@@ -30,7 +30,7 @@ class ArrayPort extends port.Port
return @sockets[socketId].beginGroup group if @isConnected socketId
- @sockets[socketId].on "connect", =>
+ @sockets[socketId].once "connect", =>
@sockets[socketId].beginGroup group
@sockets[socketId].connect()
@@ -64,7 +64,7 @@ class ArrayPort extends port.Port
if socketId is null
@sockets.forEach (socket) ->
socket.disconnect()
- return
+ return
return unless @sockets[socketId]
@sockets[socketId].disconnect()
Please sign in to comment.
Something went wrong with that request. Please try again.