Browse files

Send subgraph information on packets as an array

  • Loading branch information...
1 parent bed6a07 commit b9f573708cb34471d28df32379dea535f4ff1802 @bergie bergie committed Mar 9, 2014
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/bin/noflo.coffee
  2. +3 −3 src/lib/Network.coffee
View
2 src/bin/noflo.coffee
@@ -35,7 +35,7 @@ addDebug = (network, verbose, logSubgraph) ->
identifier = (data) ->
result = ''
- result += "#{clc.magenta.italic(data.subgraph)} " if data.subgraph
+ result += "#{clc.magenta.italic(data.subgraph.join(':'))} " if data.subgraph
result += clc.blue.italic data.id
result
View
6 src/lib/Network.coffee
@@ -277,7 +277,7 @@ class Network extends EventEmitter
unless node.component.isReady()
node.component.once 'ready', =>
@subscribeSubgraph node
- return
+ return
return unless node.component.network
@@ -286,9 +286,9 @@ class Network extends EventEmitter
do @decreaseConnections if type is 'disconnect'
data = {} unless data
if data.subgraph
- data.subgraph = "#{node.id}:#{data.subgraph}"
+ data.subgraph = data.subgraph.unshift node.id
else
- data.subgraph = node.id
+ data.subgraph = [node.id]
@emit type, data
node.component.network.on 'connect', (data) -> emitSub 'connect', data

0 comments on commit b9f5737

Please sign in to comment.