@meet-ai/cli 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -127,10 +127,15 @@ function createClient(baseUrl, apiKey) {
127
127
  const ws = new WebSocket(`${wsUrl}/api/rooms/${roomId}/ws${tokenParam}`);
128
128
  const connectTimeout = setTimeout(() => {
129
129
  if (ws.readyState !== WebSocket.OPEN) {
130
- wsLog({ event: "timeout", after_ms: 1e4 });
131
- ws.close(4000, "connect timeout");
130
+ wsLog({ event: "timeout", after_ms: 30000 });
131
+ try {
132
+ ws.close(4000, "connect timeout");
133
+ } catch {}
134
+ const delay = getReconnectDelay();
135
+ wsLog({ event: "reconnecting", attempt: reconnectAttempt, delay_ms: Math.round(delay) });
136
+ setTimeout(connect, delay);
132
137
  }
133
- }, 1e4);
138
+ }, 30000);
134
139
  ws.onopen = async () => {
135
140
  clearTimeout(connectTimeout);
136
141
  const wasReconnect = reconnectAttempt > 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meet-ai/cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "CLI for meet-ai chat rooms — create rooms, send messages, and stream via WebSocket",
5
5
  "type": "module",
6
6
  "bin": {