             port: payload.port
         sendExportedPorts connection, runtime
         # For subscribing to output packets
-        runtime.exportedEdges = [] if not runtime.exportedEdges?
         runtime.exportedEdges.push
             src:
                 process: payload.node

    runtime.device.sendCommands data, (err) ->
        # Subscribe to change notifications
        # TODO: use a dedicated mechanism for this based on subgraphs
        runtime.exportedEdges = [] if not runtime.exportedEdges?
        edges = runtime.exportedEdges.concat runtime.edgesForInspection or []
        handleNetworkEdges runtime, connection, edges, (err) ->
            runtime.uploadInProgress = false


        graph.connections = []
        graph.name = payload.name or ''
        graph.nodeMap = {} # nodeName->numericNodeId
        # FIXME: should be on the graph!
        runtime.exportedEdges = []
        runtime.edgesForInspection = []
        sendAck connection, { protocol: 'graph', command: command, payload: payload }
    else if command is "addnode"
        graph.processes[payload.id] = payload
