destroy static method

void destroy()

Destroys the singleton and closes the socket

Implementation

static void destroy() {
  _instance?.close();
  _instance = null;
  _initializationCompleter = null;
}