Title: TCP connections remain in CLOSE_WAIT state after client disconnection in SSE mode · Issue #378 · modelcontextprotocol/java-sdk · GitHub
Open Graph Title: TCP connections remain in CLOSE_WAIT state after client disconnection in SSE mode · Issue #378 · modelcontextprotocol/java-sdk
X Title: TCP connections remain in CLOSE_WAIT state after client disconnection in SSE mode · Issue #378 · modelcontextprotocol/java-sdk
Description: Bug description When clients terminate SSE connections with the Java MCP server, the underlying TCP connections remain in CLOSE_WAIT state, while the client side stays in FIN_WAIT_2. This can lead to resource leaks, especially in scenari...
Open Graph Description: Bug description When clients terminate SSE connections with the Java MCP server, the underlying TCP connections remain in CLOSE_WAIT state, while the client side stays in FIN_WAIT_2. This can lead ...
X Description: Bug description When clients terminate SSE connections with the Java MCP server, the underlying TCP connections remain in CLOSE_WAIT state, while the client side stays in FIN_WAIT_2. This can lead ...
Opengraph URL: https://github.com/modelcontextprotocol/java-sdk/issues/378
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TCP connections remain in CLOSE_WAIT state after client disconnection in SSE mode","articleBody":"**Bug description**\nWhen clients terminate SSE connections with the Java MCP server, the underlying TCP connections remain in CLOSE_WAIT state, while the client side stays in FIN_WAIT_2. This can lead to resource leaks, especially in scenarios where clients cannot properly send RST signals (e.g., when using customized user-space network stacks).\n\n\u003cimg width=\"1468\" height=\"202\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/eab041bc-bacd-4b97-b9e5-4042482c1779\" /\u003e\n\n**Environment**\njava version: 17\nsdk version: 0.10.0\nspring-ai.version: 1.0.0\n\n**Steps to reproduce**\n1. setup a plain spring-ai mcp server, listen on localhost:8888/sse\n2. use inspector to call 127.0.0.1:8888/sse\n3. use inspector to list tool/call tools/...\n4. disconnect the connection and use netstat -anp|grep 8888\n\n**Expected behavior**\nAll TCP connections should be closed properly.\n\n\n","author":{"url":"https://github.com/hty690","@type":"Person","name":"hty690"},"datePublished":"2025-07-07T07:34:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/378/java-sdk/issues/378"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a6b301b8-7772-e759-68a2-451ed2dc37fd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDD4:375586:3DA0DE:5463B9:6A5FC9F7 |
| html-safe-nonce | 41eff56e15d962730699626c3955818a92370e9d1499fea621dc0996a95b4435 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREQ0OjM3NTU4NjozREEwREU6NTQ2M0I5OjZBNUZDOUY3IiwidmlzaXRvcl9pZCI6IjcwMDgwMzkwNjEzOTI3MDYwMzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 41932a7c0ca4dac4768999e50b5f5e05ae28185b8954958890c1344ed2fbbda2 |
| hovercard-subject-tag | issue:3207882562 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/java-sdk/378/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca45aa5da64e6199a1a6794f7fd05b91f8feaf5cdcc1c98efed6056b7307fca5/modelcontextprotocol/java-sdk/issues/378 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca45aa5da64e6199a1a6794f7fd05b91f8feaf5cdcc1c98efed6056b7307fca5/modelcontextprotocol/java-sdk/issues/378 |
| og:image:alt | Bug description When clients terminate SSE connections with the Java MCP server, the underlying TCP connections remain in CLOSE_WAIT state, while the client side stays in FIN_WAIT_2. This can lead ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hty690 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8b098704642cd5473d3dc9d5d8023399a68de27a0492776c4517d75af6710ead |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/java-sdk git https://github.com/modelcontextprotocol/java-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 919609219 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/java-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 919609219 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/java-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d9cb40632285451ad16923c07a6f2debe8279086 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width