[TYRUS-229] Session#setMaxIdleTimeout() will kill the session whether or not the session actually timed out Created: 06/Aug/13  Updated: 09/Aug/13  Resolved: 09/Aug/13

Status: Resolved
Project: tyrus
Component/s: None
Affects Version/s: 1.0-b05, 1.0-b06, 1.0-b07, 1.0-b08, 1.0-b09, 1.0-b10, 1.0-b11, 1.0-b12, 1.0-b13, 1.0-b14, 1.0-rc1, 1.0-rc2, 1.0-rc3, 1.0-rc4, 1.0, 1.1, 1.2, 1.2.1
Fix Version/s: 1.3

Type: Bug Priority: Major
Reporter: martinandersson.com Assignee: stepan.kopriva
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Windows 8 x64, GlassFish 4


If you on the server side, grab the websocket session object from the @OnOpen method and call Session#setMaxIdleTimeout() using any number, when that time has passed Tyrus will forcefully close the session whether he actually timed out or not.

To test this, I registered a pong message handler who logged each time we received a pong. It showed that Internet Explorer (10), is the only browser who will send us a pong from time to time. Yet, this browser too will be affected by the aforementioned problem. Furthermore, I setup a scheduled timer to programmatically ping the client endpoint using RemoteEndpoint#sendPing(). That made all the browsers reply with a ping. However, as soon as the time passed that we had sent as an argument to the Session#setMaxIdleTimeout() method, Tyrus closed all sessions despite them being provably not idle.

Comment by martinandersson.com [ 06/Aug/13 ]

It is said in the description: "That made all the browsers reply with a ping."

It should say "That made all the browsers reply with a PONG."

..but I haven't found a way to update the description.

Comment by Pavel Bucek [ 06/Aug/13 ]


thanks for your bug report. have you tried to send or receive text or binary message?

From what I see it could be described as "receiving/sending pong/ping messages does not reset session idle timeout". Is that correct?


Comment by martinandersson.com [ 06/Aug/13 ]

I have tried to send text. So text and ping/pong is affected. Haven't tried binary though.

Generated at Thu Jun 30 22:25:56 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.