Skip to content

Instantly share code, notes, and snippets.

@phm200
Created August 21, 2018 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phm200/81e51b58c6e937e1ce1d91d5242a4f95 to your computer and use it in GitHub Desktop.
Save phm200/81e51b58c6e937e1ce1d91d5242a4f95 to your computer and use it in GitHub Desktop.
Streams API: PR 78 - Changes to terminate method
/**-------------------------------------------------------------------------
* Uninitialize Connect.
*/
connect.core.terminate = function() {
connect.core.client = new connect.NullClient();
connect.core.masterClient = new connect.NullClient();
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;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment