8000 Setting a timer for a long period of time warning · Issue #3054 · socketio/socket.io · GitHub
[go: up one dir, main page]

Skip to content
Setting a timer for a long period of time warning #3054
@rickardinho

Description

@rickardinho

Hi, I'm getting the following warnings when using socket.io with my React Native project.

I'm on React Native version 0.44.3
and socket.io-client: 1.5.1

Any ideas of how to solve or is this a bug? It seems to be slowing my whole app down significantly, as well as producing lots of console warnings.

Here is the error in the console:

Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See facebook/react-native#12981 for more info.
(Saw setTimeout with duration 85000ms)
console.warn @ index.android.bundle:40843
setTimeout @ index.android.bundle:3412
Socket.onHeartbeat @ index.android.bundle:72517
Emitter.emit @ index.android.bundle:74290
Socket.onPacket @ index.android.bundle:72470
(anonymous) @ index.android.bundle:72336
Emitter.emit @ index.android.bundle:74290
Transport.onPacket @ index.android.bundle:73298
Transport.onData @ index.android.bundle:73294
ws.onmessage @ index.android.bundle:74952
dispatchEvent @ index.android.bundle:13268
(anonymous) @ index.android.bundle:12969
emit @ index.android.bundle:3853
__callFunction @ index.android.bundle:2092
(anonymous) @ index.android.bundle:1950
__guard @ index.android.bundle:2064
callFunctionReturnFlushedQueue @ index.android.bundle:1949
(anonymous) @ debuggerWorker.js:71
index.android.bundle:40843 Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window).
console.warn @ index.android.bundle:40843
(anonymous) @ debuggerWorker.js:25
(anonymous) @ debuggerWorker.js:53

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0