{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/865","repository_url":"https://api.github.com/repos/eclipse/jetty.project","labels_url":"https://api.github.com/repos/eclipse/jetty.project/issues/865/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/jetty.project/issues/865/comments","events_url":"https://api.github.com/repos/eclipse/jetty.project/issues/865/events","html_url":"https://github.com/eclipse/jetty.project/issues/865","id":173005853,"node_id":"MDU6SXNzdWUxNzMwMDU4NTM=","number":865,"title":"Web Socket Session.close(CloseStatus) does not close web socket cleanly","user":{"login":"eoghanoh1","id":17784668,"node_id":"MDQ6VXNlcjE3Nzg0NjY4","avatar_url":"https://avatars1.githubusercontent.com/u/17784668?v=4","gravatar_id":"","url":"https://api.github.com/users/eoghanoh1","html_url":"https://github.com/eoghanoh1","followers_url":"https://api.github.com/users/eoghanoh1/followers","following_url":"https://api.github.com/users/eoghanoh1/following{/other_user}","gists_url":"https://api.github.com/users/eoghanoh1/gists{/gist_id}","starred_url":"https://api.github.com/users/eoghanoh1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eoghanoh1/subscriptions","organizations_url":"https://api.github.com/users/eoghanoh1/orgs","repos_url":"https://api.github.com/users/eoghanoh1/repos","events_url":"https://api.github.com/users/eoghanoh1/events{/privacy}","received_events_url":"https://api.github.com/users/eoghanoh1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-24T16:58:04Z","updated_at":"2018-09-14T03:27:46Z","closed_at":null,"author_association":"NONE","body":"Version: Jetty 9.3.6.\nJetty web socket native web socket implementation (not JSR-356).\n\nInvoking Session.close() the web socket closes successfully and the on close handler is executed. \n\nHowever if I attempt to close the web socket using either;\nSession.close(int statusCode, String reason) or\nSession.close(CloseStatus closeStatus)\n\nThe web socket does not seem to close immediately  and the @OnWebSocketClose annotated handler is no invoked.\n\nLooking at wireshark traces for both, I noticed a difference in the messaging.\n\nFor the successful close;\nWebSocket Connection Close [FIN] packet is sent \n[FIN, ACK] is sent \n[ACK] is received\n\nFor the unsuccessful close;\nWebSocket Connection Close [FIN] packet is sent\n[ACK] is received\n\nNo [FIN, ACK] is sent. The socket only closes when the max idle timeout is exceeded.\n"},"comment":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/comments/421219884","html_url":"https://github.com/eclipse/jetty.project/issues/865#issuecomment-421219884","issue_url":"https://api.github.com/repos/eclipse/jetty.project/issues/865","id":421219884,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTIxOTg4NA==","user":{"login":"joakime","id":191721,"node_id":"MDQ6VXNlcjE5MTcyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/191721?v=4","gravatar_id":"","url":"https://api.github.com/users/joakime","html_url":"https://github.com/joakime","followers_url":"https://api.github.com/users/joakime/followers","following_url":"https://api.github.com/users/joakime/following{/other_user}","gists_url":"https://api.github.com/users/joakime/gists{/gist_id}","starred_url":"https://api.github.com/users/joakime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joakime/subscriptions","organizations_url":"https://api.github.com/users/joakime/orgs","repos_url":"https://api.github.com/users/joakime/repos","events_url":"https://api.github.com/users/joakime/events{/privacy}","received_events_url":"https://api.github.com/users/joakime/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T03:27:46Z","updated_at":"2018-09-14T03:27:46Z","author_association":"MEMBER","body":"@nhooyr documented in the spec - https://tools.ietf.org/html/rfc6455#section-7\r\n\r\nIf you have ever spent time writing code for networking, you'll learn soon enough that the most difficult thing in all protocols is properly closing the connection.\r\n\r\nEven your \"then close the TCP connection\" has a handshake, and it's got many different states it goes through. :-)\r\n\r\nOne real (and common) TCP thing is a half-closed connection, where side A says it's done writing and tells the side B it's closed, but then continues to read from side B until the side B also says it's closed."}}
{"actor":{"display_login":"joakime"}}