Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Fix multiple calls to deployQZ()
Browse files Browse the repository at this point in the history
Resets port and protocol iterators after failed connection.
  • Loading branch information
tresf committed Nov 18, 2015
1 parent ec3de13 commit bf51347
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/qz-websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function deployQZ() {
// Old standard of WebSocket used const CLOSED as 2, new standards use const CLOSED as 3, we need the newer standard for jetty
if ("WebSocket" in window && WebSocket.CLOSED != null && WebSocket.CLOSED > 2) {
console.log('Starting deploy of qz');
qzConfig.protocolIndex = 0;
qzConfig.portIndex = 0;

connectWebsocket(qzConfig.ports[qzConfig.portIndex]);
} else {
Expand Down

0 comments on commit bf51347

Please sign in to comment.