Opened 11 years ago

Closed 10 years ago

Last modified 13 months ago

#181 closed patch (fixed)

Handle NetworkManager disconnection notices better.

Reported by: chiefbutz Owned by: seanegan
Milestone: 2.4.2 Component: pidgin (gtk)
Version: 2.0 Keywords:
Cc:

Description

I am currently using Ubuntu 6.10, and Gaim2 beta 6. I have found a few problems with the contact list. When I am not connected to the internet it still displays people, and it doesn't always update when I get connected to the internet again.

Attachments (2)

pidgin-disconnect-when-net-down.patch (453 bytes) - added by yelo3 10 years ago.
pidgin-disconnect.diff (585 bytes) - added by yelo3 10 years ago.

Download all attachments as: .zip

Change History (48)

comment:1 Changed 11 years ago by lschiere

what protocols are you using?

comment:2 Changed 11 years ago by chiefbutz

I use AIM, ICQ, Yahoo, MSN, and Jabber. The problem mainly effects AIM

comment:3 Changed 11 years ago by lschiere

  • Owner set to MarkDoliner

comment:4 Changed 11 years ago by MarkDoliner

  • Summary changed from Update Contact List to Better detection of network interruptions for AIM and ICQ

comment:5 Changed 11 years ago by chiefbutz

This problem does also effect Yahoo, MSN, and Jabber. This problem however does not exist when I use windows. Just thought I might add that.

comment:6 Changed 11 years ago by MarkDoliner

  • Summary changed from Better detection of network interruptions for AIM and ICQ to Better detection of network interruptions

Fixing our use of NetworkManager should fix this.

comment:7 Changed 11 years ago by yelo3

the same thing happens when using pidgin beta 7.

comment:8 Changed 11 years ago by MarkDoliner

  • Owner MarkDoliner deleted

comment:9 Changed 11 years ago by lschiere

  • Milestone set to 2.0.1

comment:10 Changed 11 years ago by seanegan

  • Milestone changed from 2.0.1 to 2.0.2
  • Summary changed from Better detection of network interruptions to Support NetworkManager

comment:11 Changed 11 years ago by seanegan

  • Milestone changed from 2.0.2 to 2.1.0

comment:12 Changed 10 years ago by seanegan

  • Milestone changed from 2.1.0 to 2.1.1

comment:13 Changed 10 years ago by seanegan

  • Owner set to seanegan
  • Status changed from new to assigned
  • Type changed from defect to enhancement

comment:14 Changed 10 years ago by seanegan

  • Milestone changed from 2.1.1 to 2.2.0

comment:15 Changed 10 years ago by PierreOssman

The constant changing of milestone is not that comforting... :/

Can't you have some logic where if the connection has been down for x minutes (wall time, as suspend is a common scenario), then assume the connection is dead. You should also try to check if the ip the socket is bound to is still valid.

comment:16 Changed 10 years ago by erpo41

I'm having a problem that could probably be added as a comment to this bug report. When I suspend my laptop at school, take it home, and resume it, gaim still thinks I'm connected to my IM networks, but messages people send to me get lost. Manually changing gaim from available to disconnected and back to available seems to make it work again.

Oh, and I'm not using NetworkManager for my wireless network connections. I'm using wicd.

comment:17 Changed 10 years ago by seanegan

  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #179

Changed 10 years ago by yelo3

comment:18 Changed 10 years ago by yelo3

I attached a patch that fixes the problem: when network manager says that we are disconnected, pidgin will disconnect all accounts. and when network manager says we are connected again, pidgin will automatically reconnect.

comment:19 Changed 10 years ago by yelo3

PS: I cannot understand why pidgin should send keepalive if the network is down... maybe the patch can remove more code lines, as no additional information is needed to disconnect the account!

comment:20 Changed 10 years ago by yelo3

I think this bug is not a duplicate of #179, since it has nothing to do with the new port to dbus... The problem is just that pidgin sends keepalive if the network is down, instead of disconnecting, as it does windows live messenger.

comment:21 Changed 10 years ago by MarkDoliner

With the attached patch... what happens if you move from a wireless network to a wired network with a static configuration?

comment:22 Changed 10 years ago by yelo3

I don't really know.. can you try it?

comment:23 Changed 10 years ago by yelo3

What I can test is this (I only have one cabled connection) connect with network manager, remove the card from network manager list, and then manually configure the card with gnome-config. (I run ubuntu)

in this case my patch works.

comment:24 Changed 10 years ago by rlaager

yelo3: I don't understand what problem you're trying to fix. If the network is down and we call the keepalive function, the prpl's keepalve should timeout and the account will be disconnected. If the connection isn't really down (because NetworkManager was wrong, we transitioned to a staticly configured network, or the network comes back up before the timeout), we stay connected. Is this NOT working as described?

comment:25 follow-up: Changed 10 years ago by PierreOssman

The problem is that it takes forever before it times out. And in the mean time, the gui looks as if you are still happily connected. So right now, the feature is completely useless. You still have to disconnect and reconnect manually when you switch networks.

comment:26 Changed 10 years ago by yelo3

What PierreOssman? said is exactly what happens. prpl never disconnects.

comment:27 in reply to: ↑ 25 Changed 10 years ago by rlaager

Replying to PierreOssman:

The problem is that it takes forever before it times out. And in the mean time, the gui looks as if you are still happily connected. So right now, the feature is completely useless. You still have to disconnect and reconnect manually when you switch networks.

Which protocols are you hitting this with?

comment:28 Changed 10 years ago by PierreOssman

MSN and ICQ. I only use those two, so no idea about the others, but any TCP connection should be affected.

comment:29 Changed 10 years ago by rlaager

  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Summary changed from Support NetworkManager to Handle NetworkManager disconnection notices better.

After a discussion in #pidgin, I think we have a good idea of what needs to be done here:

(15:26:03) Ethan Blanton (elb): hysteresis can be added to the NM situation (15:26:30) Ethan Blanton (elb): e.g., when we get a connection drop notice, note the time nad set a timer -- if we haven't reassociated with the same IP in a short period of time, *then* disconnect (15:26:38) Ethan Blanton (elb): if we reassociate with a different IP, force disconnect

If you could modify the patch to do this, we could incorporate it.

comment:30 Changed 10 years ago by rlaager

  • pending changed from 0 to 1

comment:31 Changed 10 years ago by yelo3

notice that it is not enough that the ip is the same, since there is the possibility to have the same internal ip, but different external ip. with internal ip I mean the ip of the lan with external ip I mean the ip of the router in the lan

comment:32 Changed 10 years ago by trac-robot

  • pending changed from 1 to 0
  • Status changed from reopened to closed

This ticket was closed automatically by the system. It was previously set to a Pending status and hasn't been updated within 14 days.

comment:33 Changed 10 years ago by yelo3

This needs to be reopened!!! It is a really important bug! attaching a new workaround patch, that automatically disconnects.

Changed 10 years ago by yelo3

comment:34 Changed 10 years ago by lschiere

  • Status changed from closed to reopened

comment:35 Changed 10 years ago by Darwin Award Winner

I have this same problem - when I suspend and resume, Pidgin gives no indication that I was ever disconnected, but after the resume, it doesn't reconnect for at least 5 minutes (I'm not sure of the actual amount of time) unless I manually set my status to Offline and then back to Available. During this time, Pidgin appears to be connected, but to everyone else, it looks as if I have logged off.

The same problem happens on a flaky wireless network that is frequently reconnecting, or even a wireless network that has a continuous but flaky connection. I have to toggle the status every time I lose the connection, which also means that I have to notice each time I lose the connection. In the latter case, since the network doesn't even get disconnected, I get absolutely no indication that I was ever disconnected, except that five or ten minutes later the friend I was talking to suddenly IM's me and asks "Where'd you go?"

Incidentally, an easy way to tell if Pidgin is in this pseudo-connected state is to IM yourself. If you don't get your message back, then Pidgin is disconnected but it doesn't know it is.

comment:36 Changed 10 years ago by jason237

I run into this problem too, with Yahoo, MSN, AIM, and Google Chat. After I change network connections or suspend/resume, I need to manually disconnect and reconnect, or it will take Pidgin a long time to notice that it needs to reconnect and I lose incoming messages.

comment:37 Changed 10 years ago by praveengarlapati

I can confirm the issue on the version 2.3.1 running on Kubuntu Gutsy.

The network changes go undetected in pidgin. Even though there is a disconnect in the network the status of the buddies doesn't change and neither does pidgin show the error that it got disconnected.

To get back to the actual status either you have to quit and reopen pidgin or modify each account to reconnect.

comment:38 Changed 10 years ago by Zillode

I confirm this issue too, using Ubuntu Gutsy, pidgin v2.2.1.

I can't receive messages because I get disconnected from the internet sometimes, due to a bad wireless connection. (It automatically reconnects, so surfing works, but msn is still offline (and gui says online). I only notice the disconnection when I try to send a message and then I have to put myself offline and then online again. This is really a nasty problem.

comment:39 Changed 10 years ago by Sim-on

similar thing happened to me. i blocked all outgoing internet-transfer with ZoneAlarm? and pidgin dont take any notice. I can send messages and chang status without error, buddys still are "online". using ICQ/MSN/Gadu-Gadu (2.4.1 WinXP)
I waited 3 minutes... nothing changed. pidgin still seems to be online for me.

After reopening the Firewall i get some socket/conncetion-erros of accounts. Messages i send during the last minutes didnt reach anybody.

comment:40 Changed 10 years ago by yelo3

I've read the 2.4.2 changelog. This seems to be fixed. Did you try?

comment:41 Changed 10 years ago by PierreOssman

I tested 2.4.2 here, and the problem still remains.

comment:42 Changed 10 years ago by rlaager

  • Milestone set to Patches Needing Improvement
  • Type changed from enhancement to patch

See comment 29 for what needs to be done.

comment:43 Changed 10 years ago by rlaager

  • Resolution set to fixed
  • Status changed from reopened to closed

Actually, I've changed my mind. The patch is fine, but as it turns out, that change has already been made (by me nonetheless). It was in 2.4.2. If this is *NOT* fixed in 2.4.2, please file a *NEW* bug report. Please note the version, whether you use NetworkManager, and what type of network connectivity you have.

comment:44 Changed 9 years ago by darkrain42

  • Milestone changed from Patches Needing Improvement to 2.4.2

comment:45 Changed 7 years ago by kc9bcy

4 years? Hmm. Still not fixed, yet closed, on every re-incarnation of this problem. Hell, this is even a different operating system.

comment:46 Changed 13 months ago by intika

Pidgin have a serious lack when it comes to notifying the connection state, when network is down, an account is no more connected or when any network error happen.

In the default behavior, pidgin will always show the connected tray icon instead of showing a different icon like other IMs.

This patch/version workaround show the "away" icon when any network icon happen. It’s a usable workaround awaiting dev to add the feature.

https://github.com/intika/Pidgin_Notify_Disconnected_To_Tray_Icon

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!