Skip to content

Safari dropping web socket connection due to inactivity when page not in focus #2924

@twistedpixel

Description

@twistedpixel

You want to:

  • report a bug
  • request a feature

Current behaviour

Not sure if this is a known issue (I tried searching but found nothing). Safari for Mac appears to be silently dropping websocket connections due to inactivity/idle if the page/tab is not in focus.

Steps to reproduce (if the current behaviour is a bug)

Make Safari tab/page not in focus; log websocket events.

Expected behaviour

Websockets should be kept alive via the heartbeat functionality. Not seeing this behavior in other browsers so unlikely to be my code.

Setup

  • OS: Mac OSX 10.12.4 (16E195)
  • browser: Safari 10.1 (12603.1.30.0.34)
  • socket.io version: 1.7.3

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Is this possibly some sort of power-saving feature that is overriding/ignoring the heartbeats?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions