Skip to content

qz-tray.js: isActive() is also true while connecting #1458

@antoineveldhoven

Description

@antoineveldhoven

Hi @tresf,

I'm wondering what the motivation behind the concept isActive() === true while the websocket is connecting is.
In my opinion a connection is only active when it is truly connected, connecting state might not result in a connection.

In async operations qz reports back that it is active, while in fact it is still trying to connect.

            isActive: function() {
                return !_qz.websocket.shutdown && _qz.websocket.connection != null
                    && (_qz.websocket.connection.readyState === _qz.tools.ws.OPEN
                        || qz.websocket.connection.readyState === _qz.tools.ws.CONNECTING);
            },

Metadata

Metadata

Assignees

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions