@clonegod/ttd-core 2.0.78 → 2.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,5 +24,4 @@ export declare class WebSocketClient {
24
24
  isConnected(): boolean;
25
25
  private startKeepAlive;
26
26
  private stopKeepAlive;
27
- private setupGlobalErrorHandlers;
28
27
  }
@@ -23,7 +23,6 @@ class WebSocketClient {
23
23
  this.keepAliveTimer = null;
24
24
  this.url = url;
25
25
  this.options = Object.assign({ reconnectInterval: 3000, rejectUnauthorized: false, keepAlive: false, keepAliveInterval: 30000 }, options);
26
- this.setupGlobalErrorHandlers();
27
26
  (0, dist_1.log_info)(`WebSocketClient constructor, url: ${this.url}`, this.options);
28
27
  }
29
28
  connect() {
@@ -62,7 +61,7 @@ class WebSocketClient {
62
61
  }
63
62
  reconnect() {
64
63
  return __awaiter(this, void 0, void 0, function* () {
65
- (0, dist_1.log_warn)(`Reconnecting in ${this.options.reconnectInterval}ms`);
64
+ (0, dist_1.log_info)(`Reconnecting in ${this.options.reconnectInterval}ms`);
66
65
  yield (0, dist_1.sleep)(this.options.reconnectInterval);
67
66
  this.disconnect();
68
67
  this.connect();
@@ -123,13 +122,5 @@ class WebSocketClient {
123
122
  (0, dist_1.log_info)('KeepAlive stopped');
124
123
  }
125
124
  }
126
- setupGlobalErrorHandlers() {
127
- process.on('uncaughtException', (error) => {
128
- (0, dist_1.log_error)('Uncaught Exception in WebSocketClient:', error);
129
- });
130
- process.on('unhandledRejection', (reason, promise) => {
131
- (0, dist_1.log_error)('Unhandled Rejection in WebSocketClient:', reason instanceof Error ? reason : new Error(String(reason)));
132
- });
133
- }
134
125
  }
135
126
  exports.WebSocketClient = WebSocketClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-core",
3
- "version": "2.0.78",
3
+ "version": "2.0.79",
4
4
  "description": "Common types and utilities for trading systems - use `npm run push` to publish",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",