thinknagent 0.1.6 → 0.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.
Files changed (2) hide show
  1. package/lib/connect.js +4 -2
  2. package/package.json +1 -1
package/lib/connect.js CHANGED
@@ -74,8 +74,10 @@ class Connection {
74
74
  this.role = role;
75
75
  console.log(`[thinknagent] Approved! Reconnecting with token...`);
76
76
 
77
- // YE ADD KARO — disconnect karo, socket.io auto-reconnect karega naye token ke saath
78
- this.socket.disconnect();
77
+ this.socket.disconnect(); // pehle disconnect
78
+ setTimeout(() => {
79
+ this.socket.connect(); // phir manually reconnect
80
+ }, 500);
79
81
  });
80
82
  // Server says: "Owner rejected this agent"
81
83
  s.on('agent:rejected', ({ reason }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinknagent",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "ThinkNCollab server agent — metrics, logs, alerts, shell bridge",
5
5
  "main": "lib/agent.js",
6
6
  "bin": {