message: fix: close socket only if opened
diff: @@ -61,8 +61,10 @@ class WebSocketClient{
  close() {
  this.ended = true;
  + if (this.opened) {
  this.instance.close();
  }
  + }
  onOpen(handler) {
  this.ee.on("open", handler);
  