@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.
- package/imaplib/imap-native.js +5 -7
- package/package.json +1 -1
package/imaplib/imap-native.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
155
|
-
this.pendingCommand = null;
|
|
152
|
+
catch { /* ignore */ }
|
|
153
|
+
this.pendingCommand = null;
|
|
156
154
|
this.transport.close();
|
|
157
155
|
this._connected = false;
|
|
158
156
|
}
|