Bug 59177 - Throw IOException each time close websocket session
Summary: Throw IOException each time close websocket session
Status: RESOLVED DUPLICATE of bug 59014
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: WebSocket (show other bugs)
Version: 7.0.68
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2016-03-14 10:35 UTC by Phuong
Modified: 2016-03-14 11:04 UTC (History)
0 users

sample websocket app (8.04 KB, application/zip)
2016-03-14 10:35 UTC, Phuong

Note You need to log in before you can comment on or make changes to this bug.
Description Phuong 2016-03-14 10:35:39 UTC
Created attachment 33668 [details]
sample websocket app

- Each time a websocket session is closed, it always throw IOException.
The reason is when WSSession#onClose method is called, and it changes the state to State.CLOSING, but the WSSesssion#registerFuture fail the checking state, if the State is not OPEN, it throw exception

- This bug not happen on Tomcat 7.0.63

- I have attached the sample app that use websocket, this sample is the "Echo" sample downloaded from Tomcat document page.
- Steps to reproduce issue:
+ Deploy app and go to : http://localhost:8080/wsSample/test.html
+ Connect, send messsage
+ Disconnect --> Throw IOException in tomcat error log

- I guess we should instead check State is not close instead of is OPEN in WSSesssion#registerFuture
Comment 1 Violeta Georgieva 2016-03-14 11:04:02 UTC

*** This bug has been marked as a duplicate of bug 59014 ***