@tmcp/session-manager 0.1.1 → 0.1.2
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/index.js +5 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -64,8 +64,12 @@ export class InMemorySessionManager extends SessionManager {
|
|
|
64
64
|
delete(id) {
|
|
65
65
|
const controller = this.#sessions.get(id);
|
|
66
66
|
if (controller) {
|
|
67
|
-
controller.close();
|
|
68
67
|
this.#sessions.delete(id);
|
|
68
|
+
try {
|
|
69
|
+
controller.close();
|
|
70
|
+
} catch {
|
|
71
|
+
// could error if the controller is already closed
|
|
72
|
+
}
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
75
|
|