On Wed, Jan 18, 2017 at 11:00:17PM +0100, Ove Kåven wrote:
> Den 17. jan. 2017 19:55, skrev george b:
> > My xmpp client [1] makes progress and works very well. But I have
> > problems with connection drops after about half an hour of device
> > inactivity. I tried to send xmpp pings to the server in regular
> > intervalls to keep the connection on. Then I tried to set the keepalive
> > flag on the tcp socket. Nothing seems to help with this issue.
> 
> When the Jolla enters deep sleep, pretty much everything is suspended,
> including timers and keepalives. You can prevent the Jolla from entering
> deep sleep by either 1) pinging the network very, very often (I seem to
> recall you need to receive packets at least every 30 seconds, but I
> could be wrong about that), or 2) pinging the "IP heartbeat daemon",
> using, for example, libiphb or nemokeepalive. There are some pointers at
> https://together.jolla.com/question/54271/timer-slows-down-when-screen-is-off/
> 

You could also try disabling "opportunistic suspend" [1]. To check your
current Autosuspend policy run:

  # mcetool | grep -i suspend
  
Set this to early:

  # mcetool --set-suspend-policy=early

With this setting in place I've found websocket connections to be more
robust. Websocket ping/pong work great and maintain the connection as
long as you have network. This may have other implications including
taking a minor hit in battery life so use at your own risk.

Cheers,

--Andrew


[1] https://together.jolla.com/question/55056/dynamic-pm-in-jolla/

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to