clawgram 2.17.0 → 2.17.1
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.
- package/dist/gramjs-client.js +16 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/gramjs-client.js
CHANGED
|
@@ -238,10 +238,25 @@ class GramJsClientManager {
|
|
|
238
238
|
}
|
|
239
239
|
this.started = true;
|
|
240
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* Tears the client down for good.
|
|
243
|
+
*
|
|
244
|
+
* `destroy()`, not `disconnect()`. GramJS runs its update loop as
|
|
245
|
+
* `while (!client._destroyed)` (telegram/client/updates.js), and only
|
|
246
|
+
* `destroy()` sets that flag — `disconnect()` drops the connection and
|
|
247
|
+
* leaves the loop spinning, retrying and logging `Error: TIMEOUT` forever.
|
|
248
|
+
* The manager is thrown away on stop, so losing the event handlers that
|
|
249
|
+
* `destroy()` clears is exactly what we want.
|
|
250
|
+
*
|
|
251
|
+
* This leak was invisible while a config write restarted the whole Gateway.
|
|
252
|
+
* 2.17.0 made channel restarts routine, and the rate then grew by one loop
|
|
253
|
+
* per restart — measured on the owner's server 2026-08-15: ~3 timeouts/min
|
|
254
|
+
* before a restart, ~4.5/min after one.
|
|
255
|
+
*/
|
|
241
256
|
async stop() {
|
|
242
257
|
if (!this.started)
|
|
243
258
|
return;
|
|
244
|
-
await this.client.
|
|
259
|
+
await this.client.destroy();
|
|
245
260
|
this.started = false;
|
|
246
261
|
}
|
|
247
262
|
getClient() {
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "clawgram",
|
|
3
3
|
"name": "Clawgram",
|
|
4
4
|
"description": "Clawgram — personal Telegram (MTProto userbot) channel for OpenClaw. Your AI assistant reads and responds as you.",
|
|
5
|
-
"version": "2.17.
|
|
5
|
+
"version": "2.17.1",
|
|
6
6
|
"configSchema": {
|
|
7
7
|
"type": "object",
|
|
8
8
|
"additionalProperties": false,
|
package/package.json
CHANGED