Skip to content

Commit

Permalink
Fix "connected" message missing in some cases
Browse files Browse the repository at this point in the history
Once a disconnect message was printed once it would not print a connect
message for the same session again since a timer id wasn't reset.

No unit test was possible since the mock-socket has certain
incompatibilities/limitations that make it impossible to distinguish
different sockets. An upgrade of that module introduced different
problems documented in CLI issue #75

Change-Id: I187ccb4ac4e84009dc8dc144c66eccf52e4d06a5
  • Loading branch information
tbuschto committed Jan 10, 2020
1 parent 866fc57 commit 21711a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/services/DebugServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ module.exports = class DebugServer {

_onDisconnect(connection) {
this._printStateTimer = setTimeout(() => {
this._printStateTimer = -1;
this._printClientState(connection.device, STATE_DISCONNECTED);
if (this._onEvaluationCompleted) {
this._onEvaluationCompleted();
Expand Down

0 comments on commit 21711a8

Please sign in to comment.