New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OC P2P odness #2087

Closed
XFactHD opened this Issue Jan 5, 2016 · 10 comments

Comments

Projects
None yet
3 participants
@XFactHD
Collaborator

XFactHD commented Jan 5, 2016

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

@yueh

This comment has been minimized.

Show comment
Hide comment
@yueh

yueh Jan 5, 2016

Member

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.

Member

yueh commented Jan 5, 2016

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.

@yueh yueh added the type-bug label Jan 5, 2016

@fnuecke

This comment has been minimized.

Show comment
Hide comment
@fnuecke

fnuecke Jan 5, 2016

Contributor

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?

Contributor

fnuecke commented Jan 5, 2016

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?

@yueh

This comment has been minimized.

Show comment
Hide comment
@yueh

yueh Jan 5, 2016

Member

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.

Member

yueh commented Jan 5, 2016

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.

@XFactHD

This comment has been minimized.

Show comment
Hide comment
@XFactHD

XFactHD Jan 5, 2016

Collaborator

@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.

Collaborator

XFactHD commented Jan 5, 2016

@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.

@XFactHD

This comment has been minimized.

Show comment
Hide comment
@XFactHD

XFactHD Jan 5, 2016

Collaborator

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

Collaborator

XFactHD commented Jan 5, 2016

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

@fnuecke

This comment has been minimized.

Show comment
Hide comment
@fnuecke

fnuecke Jan 5, 2016

Contributor

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.

Contributor

fnuecke commented Jan 5, 2016

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.

@XFactHD

This comment has been minimized.

Show comment
Hide comment
@XFactHD

XFactHD Jan 5, 2016

Collaborator

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

Collaborator

XFactHD commented Jan 5, 2016

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

@yueh

This comment has been minimized.

Show comment
Hide comment
@yueh

yueh Jan 5, 2016

Member

Neither of these methods are overridden in PartP2POpenComputers.java

Member

yueh commented Jan 5, 2016

Neither of these methods are overridden in PartP2POpenComputers.java

@fnuecke

This comment has been minimized.

Show comment
Hide comment
Contributor

fnuecke commented Jan 5, 2016

fnuecke added a commit to fnuecke/Applied-Energistics-2 that referenced this issue Jan 5, 2016

Reworked computer P2P tunnel to use events, and added check for outpu…
…t port validity, closes #2087.

Instead of just `onTunnelNetworkChange`, this way it is more stable and more exhaustive, avoiding issues with network splits and reconnects not being handled in some cases. Also added check for output port validity when connecting from the perspective of the input, which may potentially have led to invalid connections.

fnuecke added a commit to fnuecke/Applied-Energistics-2 that referenced this issue Jan 5, 2016

Reworked computer P2P tunnel to use events, and added check for outpu…
…t port validity, closes #2087.

Instead of just `onTunnelNetworkChange`, this way it is more stable and more exhaustive, avoiding issues with network splits and reconnects not being handled in some cases. Also added check for output port validity when connecting from the perspective of the input, which may potentially have led to invalid connections.

fnuecke added a commit to fnuecke/Applied-Energistics-2 that referenced this issue Jan 5, 2016

Reworked computer P2P tunnel to use events, and cleaned up reconnecti…
…on, fixes #2087.

Just `onTunnelNetworkChange` with tickable is apparently less exhaustive, and less stable. This now avoiding issues with network splits and reconnects not being handled in some cases. Also simplified reconnection; there was some duplicate logic in there, with a missing validity check which potentially led to invalid connections.

fnuecke added a commit to fnuecke/Applied-Energistics-2 that referenced this issue Jan 5, 2016

Reworked computer P2P tunnel to use events, and cleaned up reconnecti…
…on, fixes #2087.

Just `onTunnelNetworkChange` with tickable is apparently less exhaustive, and less stable. This now avoids issues with network splits and reconnects not being handled in some cases. Also simplified reconnection; there was some duplicate logic in there, with a missing validity check which potentially led to invalid connections.
@fnuecke

This comment has been minimized.

Show comment
Hide comment
@fnuecke

fnuecke Jan 5, 2016

Contributor

See #2088.

Contributor

fnuecke commented Jan 5, 2016

See #2088.

@yueh yueh closed this in 2ea05bc Jan 8, 2016

yueh added a commit that referenced this issue Jan 8, 2016

Merge pull request #2088 from fnuecke/master
Reworked computer P2P tunnel for #2087

yueh added a commit that referenced this issue Jan 9, 2016

Reworked computer P2P tunnel to use events, and cleaned up reconnecti…
…on, fixes #2087.

Just `onTunnelNetworkChange` with tickable is apparently less exhaustive, and less stable. This now avoids issues with network splits and reconnects not being handled in some cases. Also simplified reconnection; there was some duplicate logic in there, with a missing validity check which potentially led to invalid connections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment