indrora / Atomic

Atomic: an IRC client from the ashes of yaaic
https://indrora.github.io/Atomic/
GNU General Public License v3.0
123 stars 29 forks source link

Atomic gets stuck in a disconnected state #71

Open haarp opened 9 years ago

haarp commented 9 years ago

Hello,

several times now I've noticed that switching the device's connectivity (Wifi access points, mobile data to Wifi or back) makes Atomic go crazy for a bit. I can't remember the exact error (will post it here when it happens again), but it came from the SSL backend.

Anyway, when it fails to connect, Atomic seems to be stuck and makes no further attempts to reconnect anymore. The "Reconnect" setting is enabled and the interval set to 1 minute. I've waited more than 15 minutes and it did nothing without my intervention. Additionally, when the channel view/server window of this network is opened, the menu shows a (non-functional) 'disconnect' entry, despite it not being connected to begin with. Turning that into a 'connect' entry would make more sense imo.

indrora commented 9 years ago

I'm aware of this problem -- the SSL socket in Java throws a different error than the standard socket when something generally goes wrong. I've fixed it in a few commits, and the "reconnect" option has been changed to "Reconnect on network error" -- Any general network failure will invoke a reconnect (the timeout is now a fixed 5 seconds, which is fairly aggressive).

On Mon Dec 08 2014 at 9:56:03 AM haarp notifications@github.com wrote:

Hello,

several times now I've noticed that when switching networks (Wifi access points, mobile data to Wifi or back) makes Atomic go crazy for a bit. I can't remember the exact error (will post it here when it happens again), but it came from the SSL backend.

Anyway, when it fails to connect, Atomic seems to be stuck and makes no further attempts to reconnect anymore. The "Reconnect" setting is enabled and the interval set to 1 minute. I've waited more than 15 minutes and it did nothing without my intervention. Additionally, when the channel view/server window of this network is opened, the menu shows a (non-functional) 'disconnect' entry, despite it not being connected to begin with.

— Reply to this email directly or view it on GitHub https://github.com/indrora/Atomic/issues/71.

haarp commented 9 years ago

Sounds good, thanks! I'll give it a try once I can get my hands on that release.

A related issue I encountered today: Atomic thought it was connected while in fact it wasn't. Message: "Could not connect to foo: The PircBot is already connected to an IRC server. Disconnect first." The program was pretty much stuck. I could neither disconnect nor reconnect it. I had to close it first.

indrora commented 9 years ago

Yes, it's possible to get the irc library underneath into an invalid state. I've been working on g fixing that.

On Tue, Dec 9, 2014, 2:13 AM haarp notifications@github.com wrote:

Sounds good, thanks! I'll give it a try once I can get my hands on that release.

A related issue I encountered today: Atomic thought it was connected while in fact it wasn't. Message: "Could not connect to foo: The PircBot is already connected to an IRC server. Disconnect first." The program was pretty much stuck. I could neither disconnect nor reconnect it. I had to close it first.

— Reply to this email directly or view it on GitHub https://github.com/indrora/Atomic/issues/71#issuecomment-66253542.