reset_count++;
Context.LoopFactory lf = ctx.new LoopFactory(dock, 1);
- //System.out.println("absorbing tokens from " + dip_peer.dock + " to " + dock + "(a "+Module.this.getClass().getName()+")");
- for(int i=0; i<peer.getTokensToAbsorb(); i++) {
- lf.recvToken();
+ if (peer != null) {
+ for(int i=0; i<peer.getTokensToAbsorb(); i++) {
+ lf.recvToken();
+ }
+ //lf.sendToken(dip_peer.dock.getInstructionDestination());
}
- //lf.sendToken(dip_peer.dock.getInstructionDestination());
lf.sendToken(fleet.getShip("Debug",0).getDock("in").getDataDestination());
lf = lf.makeNext(0);