@bobfrankston/iflow 1.0.42 → 1.0.43

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.
@@ -141,18 +141,16 @@ export class NativeImapClient {
141
141
  this.capabilities.add(c.toUpperCase());
142
142
  }
143
143
  async logout() {
144
+ // Send LOGOUT but don't wait — just close the transport immediately.
145
+ // The server will clean up the session when the socket closes.
144
146
  try {
145
147
  if (this._connected) {
146
148
  const tag = proto.nextTag();
147
- // Timeout the LOGOUT command — don't let it hang forever
148
- await Promise.race([
149
- this.sendCommand(tag, proto.logoutCommand(tag)),
150
- new Promise((_, reject) => setTimeout(() => reject(new Error("LOGOUT timeout")), 5000))
151
- ]);
149
+ this.transport.write(proto.logoutCommand(tag)).catch(() => { });
152
150
  }
153
151
  }
154
- catch { /* ignore — always close transport below */ }
155
- this.pendingCommand = null; // clear any hanging promise
152
+ catch { /* ignore */ }
153
+ this.pendingCommand = null;
156
154
  this.transport.close();
157
155
  this._connected = false;
158
156
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/iflow",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "IMAP client wrapper library",
5
5
  "main": "index.js",
6
6
  "types": "index.ts",