You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eb5d359
Browse filesBrowse the repository at this point in the historyBrowse files
feat: improve thread safety and resource management in WebMVC streamable transport
- Add ReentrantLock synchronization to prevent race conditions in concurrent sseBuilder usage
- Add volatile closed flag to track session state and prevent operations on closed sessions
- Move SSE onComplete callback to properly close listening stream when connection completes
- Refactor closeGracefully to delegate to close() method for consistent cleanup
- Update class documentation to reflect thread-safety guarantees
This ensures safe concurrent access to SSE builder and proper cleanup of streaming resources.
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Copy file name to clipboardExpand all lines: mcp-spring/mcp-spring-webmvc/src/main/java/io/modelcontextprotocol/server/transport/WebMvcStreamableServerTransportProvider.java
0 commit comments