playsocketjs 1.1.6 → 1.1.7

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.
@@ -2230,6 +2230,14 @@ function requireServer () {
2230
2230
  ws.on('pong', () => { ws.isAlive = true; });
2231
2231
  ws.on('message', msg => this.#handleMessage(ws, msg));
2232
2232
  ws.on('close', () => this.#handleDisconnection(ws));
2233
+ ws.on('error', (error) => {
2234
+ console.error(`PlaySocket WebSocket connection error for client ${ws.clientId || 'unknown'}:`, error); // Catch conn errors
2235
+ });
2236
+ });
2237
+
2238
+ // Log & catch server-level errors
2239
+ this.#wss.on('error', (error) => {
2240
+ console.error('PlaySocket WebSocket server error:', error);
2233
2241
  });
2234
2242
 
2235
2243
  // Start heartbeat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playsocketjs",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "WebSocket wrapper for creating simple multiplayer systems with ease.",
5
5
  "module": "dist/playsocket-client.js",
6
6
  "exports": {