mezon-js 2.7.37 → 2.7.38

Sign up to get free protection for your applications and to get access to all the features.
@@ -4251,7 +4251,7 @@ var _DefaultSocket = class _DefaultSocket {
4251
4251
  };
4252
4252
  this.adapter.onError = (evt) => {
4253
4253
  reject(evt);
4254
- this.adapter.close();
4254
+ this.onerror(evt);
4255
4255
  };
4256
4256
  setTimeout(() => {
4257
4257
  reject("The socket timed out when trying to connect.");
@@ -4222,7 +4222,7 @@ var _DefaultSocket = class _DefaultSocket {
4222
4222
  };
4223
4223
  this.adapter.onError = (evt) => {
4224
4224
  reject(evt);
4225
- this.adapter.close();
4225
+ this.onerror(evt);
4226
4226
  };
4227
4227
  setTimeout(() => {
4228
4228
  reject("The socket timed out when trying to connect.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.37",
3
+ "version": "2.7.38",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -978,7 +978,9 @@ export class DefaultSocket implements Socket {
978
978
  }
979
979
  this.adapter.onError = (evt: Event) => {
980
980
  reject(evt);
981
- this.adapter.close();
981
+ // TODO: do not close the adapter
982
+ this.onerror(evt);
983
+ //this.adapter.close();
982
984
  }
983
985
 
984
986