#765892 pidgin: Pidgin does not disconnect on suspend

Package:
pidgin
Source:
pidgin
Description:
graphical multi-protocol instant messaging client
Submitter:
Peter Spiess-Knafl
Date:
2015-04-27 18:21:10 UTC
Severity:
wishlist
#765892#5
Date:
2014-10-19 00:35:52 UTC
From:
To:
When I close the laptop lid something goes wrong with proper account
disconnecting.
After my notebook suspended, I still appear online for my contacts, even though
I am not (on any computer).

It is strange, that in the (attached) pidgin log I see the NetworkManager event
which should disconnect my account, so that I am no longer online, but it
doesn't work.


I am using systemd as init system (if that is important).

Pidgin Debug log (after suspending and resuming again):

(01:25:56) network: Got StateChange from NetworkManager: 10.
(01:25:56) account: Disconnecting account psk@autistici.org/ (0x7f1c46c1ccc0)
(01:25:56) connection: Disconnecting connection 0x7f1c478b1c10
(01:25:56) connection: Deactivating keepalive.
(01:25:56) jabber: Sending (ssl)
(psk@autistici.org/17910177181413678280191277): </stream:stream>
(01:25:56) connection: Destroying connection 0x7f1c478b1c10
(01:26:06) network: Got StateChange from NetworkManager: 20.
(01:26:07) util: Writing file blist.xml to directory /home/cinemast/.purple
(01:26:07) util: Writing file /home/cinemast/.purple/blist.xml
(01:26:07) util: Writing file accounts.xml to directory /home/cinemast/.purple
(01:26:07) util: Writing file /home/cinemast/.purple/accounts.xml
(01:26:09) network: Got StateChange from NetworkManager: 40.
(01:26:09) network: Got StateChange from NetworkManager: 50.
(01:26:09) autorecon: do_signon called
(01:26:09) autorecon: calling purple_account_connect
(01:26:09) account: Connecting to account psk@autistici.org/.
(01:26:09) connection: Connecting. gc = 0x7f1c4789e680
(01:26:09) dnssrv: querying SRV record for autistici.org: _xmpp-
client._tcp.autistici.org
(01:26:09) autorecon: done calling purple_account_connect
(01:26:09) dnssrv: res_query returned an error
(01:26:09) dnsquery: Performing DNS lookup for autistici.org
(01:26:09) dns: Wait for DNS child 21589 failed: No child processes
(01:26:09) dns: Created new DNS child 21808, there are now 1 children.
(01:26:09) dns: Successfully sent DNS request to child 21808
(01:26:09) network: Got StateChange from NetworkManager: 70.
(01:26:15) dns: Got response for 'autistici.org'
(01:26:15) dnsquery: IP resolved for autistici.org
(01:26:15) proxy: Attempting connection to 82.94.249.234
(01:26:15) proxy: Connecting to autistici.org:5222 with no proxy
(01:26:15) proxy: Connection in progress
(01:26:15) proxy: Connecting to autistici.org:5222.
(01:26:15) proxy: Connected to autistici.org:5222.

#765892#10
Date:
2014-10-19 01:35:32 UTC
From:
To:
Given that the pidgin logs say that it disconnected correctly, are you sure
this is a pidgin bug and not the XMPP server? Does the server immediately
mark you as offline if you exit pidgin manually?

#765892#15
Date:
2014-10-21 13:18:31 UTC
From:
To:
Thanks for responding so quickly.

I am not entirely sure no, but I tried with various different XMPP
servers (prosody, ejabberd, public ones like google-talk).
It does mark me offline if I exit manually, yes.

So you cannot reproduce this behaviour?

#765892#22
Date:
2015-03-27 10:10:04 UTC
From:
To:
Hello Ari!
I am also affected by this bug.
When I suspend the computer Pidgin never succeeds to mark me offline and so I appear online till my XMPP connections time out.
So I have lots of confusion and lost messages with my buddies.

I think the failing disconnecting is caused by systemd + NetworkManager.
It seems that NetworkManager cuts of the network connection instantly when going to suspend.
Then Pidgin tries to disconnect the chat accounts and of course it never reaches the XMPP server.

Regards,
Bruno

#765892#27
Date:
2015-04-27 18:18:41 UTC
From:
To:
Hello all,
I did further investigation on Pidgin's failure to disconnect on suspend
and I think it's a bug in NetworkManager that is causing this behavior.

I reported it upstream here:
https://bugzilla.gnome.org/show_bug.cgi?id=748531

Greetings,
Bruno