Skip to content

Commit

Permalink
fix: added eventbus flush and additional resets to .terminate()
Browse files Browse the repository at this point in the history
  • Loading branch information
dnovicki committed Aug 15, 2018
1 parent e9b5224 commit b4186d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@
connect.core.terminate = function() {
connect.core.client = new connect.NullClient();
connect.core.masterClient = new connect.NullClient();
connect.core.eventBus = new connect.EventBus();
var bus = connect.core.getEventBus();
if(bus) bus.unsubscribeAll();
connect.core.bus = new connect.EventBus();
connect.core.agentDataProvider = null;
connect.core.upstream = null;
connect.core.keepaliveManager = null;
connect.agent.initialized = false;
connect.core.initialized = false;
};

Expand Down

0 comments on commit b4186d4

Please sign in to comment.