Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#16249 closed enhancement (fixed)

Adium should be disabled during PowerNaps

Reported by: David Munch Owned by:
Milestone: Adium 1.5.10 Component: Adium Core
Version: 1.7hg Severity: normal
Keywords: powernap sleep Cc:
Patch Status: Accepted

Description (last modified by David Munch)


From the forum:

"Due to a limitation in libpurple it is currently impossible to log into ICQ on different machines.
This is not you fault, but it has severe effects.

If closing the lid / standby the MacBook on power plug, the PowerNap feature will wake up the machine in some intervals to load new mails/calendar events, etc. When it wakes up into this non-graphical mode, Adium connects to all protocols and therefor disconnects any other client currently using my ICQ account."

Change History (16)

comment:1 Changed 7 years ago by David Munch

  • Description modified (diff)

comment:2 Changed 7 years ago by David Munch

  • Description modified (diff)

comment:3 Changed 7 years ago by sphynx

Ticket #16251 has been marked as a duplicate of this ticket.

comment:4 Changed 7 years ago by baumgold

Any progress on this?

comment:5 Changed 6 years ago by Crazor

I found the following information while researching this bug:

Quoting the interesting part:

The partial wake state used by Power Nap is known as Dark Wake, and while in this state the NSWorkspaceDidWakeNotification and SCNetworkReachability callbacks are not sent. As a result a simple solution is to watch for the NSWorkspaceWillSleepNotification and disable reconnects or network state observers until an NSWorkspaceDidWakeNotification is received. Alternatively an application can adopt the SCNetworkReachability APIs if possible and rely on those callbacks to inform the app when it is appropriate to reconnect.

comment:6 Changed 6 years ago by Robby

  • Milestone set to Adium bugs

Thanks, Crazor. This might help a developer fix the issue.

comment:7 Changed 6 years ago by Zorg

My fix can be found in my fork.

Adium fires sleep notifications correctly, which isn't the problem here. The problem is some of the reachability events were kicking in when power nap came in effect. The previous approach was to reconfigure reachability when waking up from the system rather than first disabling it when the system goes to sleep.

comment:8 Changed 6 years ago by Robby

  • Milestone changed from Adium bugs to Adium 1.5.10
  • Patch Status set to Needs Dev Review

Thank you very much!

comment:9 Changed 6 years ago by Robby

Zorg, should the newer of your two commits go in as well?

comment:10 Changed 6 years ago by Zorg

Both commits are relevant to my patch.

comment:11 Changed 6 years ago by Zorg <zorgiepoo@…>

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

(In 2aa34a01048d) Disable reachability scheduling when the system sleeps and enables it back when system wakes up.

Fixes #16249 a bug where Adium reconnected to IM services when woken up from Power Nap.


comment:12 Changed 6 years ago by Robby

  • Patch Status changed from Needs Dev Review to Accepted

comment:13 Changed 6 years ago by Robby

Thanks, Zorg! Which name would you like to be credited with?

comment:14 Changed 6 years ago by Zorg

Name is Mayur Pawashe

comment:15 Changed 6 years ago by Robby

Okay, will add you in shortly. :-)

comment:16 Changed 6 years ago by Robert Vehse <robertvehse@…>

(In 627e2dd5fa91) Changelogging. Credit "Zorg". References #16249.

Note: See TracTickets for help on using tickets.