Release handlers on close to break session reference cycles
Handlers commonly capture a clone of their own Session, and the Session owns its handlers, so a closed session was never freed. On shutdown, take the on_close handler instead of cloning it and clear the request and notification handlers after it runs. Bump to 0.2.1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "session-rs"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
edition = "2024"
|
||||
description = "A lightweight async request/response and notification protocol over WebSockets"
|
||||
license = "Apache-2.0"
|
||||
|
||||
Reference in New Issue
Block a user