Applied Energistics 2

Applied Energistics 2

137M Downloads

OC P2P odness

XFactHD opened this issue ยท 10 comments

commented

If I try to crash my OC computer with a "no such component" error by disconnecting the me cable in the back of the P2P, the P2P goes offline but the OC network is not disconnected and the OC computer still gets updated data. Any ideas @fnuecke?
AE: rv3 beta 2
OC: 1.5.20

commented

Looks like the tunnel is never handling being disabled/removed and updating the OC connection accordingly. They simply create a connection and go to sleep forever.

I do not really know the OC API, so @fnuecke should really look into it.

commented

Yeah, I'll have a look. To clarify, the connection gets established via the tunnel, but when the tunnel goes offline, the OC subnets on either side of the tunnel stay connected?

commented

See #2088.

commented

You might also want to look into PartP2PTunnel#onTunnelConfigChange() and PartP2PTunnel#onTunnelNetworkChange() to establish the connection instead of ticking the tunnel.

But I cannot really test it as I have no idea how to even use the most basic OC stuff.

commented

@fnuecke What I did was that I connected 21 OC P2P tunnel to my network, then I saved the settings from one P2P and loaded them into the other 20 P2P tunnels. Then I connected all peripherals and the computer and started my program. As I wanted to change a variable and closing the program over touch doesn't work at the moment, I wanted to crash the OC computer with "no such component" by disconnecting the me cable from the P2P tunnel. The P2P tunnel went offline but the computer did still update the information from the peripherals.

commented

@yueh onTunnelNetworkChange is overridden in PartP2POpenComputers.java and contains code to wake the P2P up but onConnect and onDisconnect are overridden and are empty.

commented

From what I can remember, the onTunnelNetworkChange schedules a tick because there were some scenarios where reconnecting didn't work properly when updating connections immediately. I'll have another look though, and also at onTunnelConfigChange.

The onConnect and onDisconnect are from OC nodes and should be irrelevant here.

commented

Ah, ok, didn't know they were from OC.

commented

Neither of these methods are overridden in PartP2POpenComputers.java