Hi,
When I tested DefaultSelectionKeyHandler simply, Keep alive timeout was not active.
I attached the proposed patch and a unit test case at Grizzly issue #669 (
https://grizzly.dev.java.net/issues/show_bug.cgi?id=669).
I think that you can reproduce it easily with attached unit test case.
And the proposed patch is simple.
Index: main/java/com/sun/grizzly/DefaultSelectionKeyHandler.java
===================================================================
--- main/java/com/sun/grizzly/DefaultSelectionKeyHandler.java (revision 3298)
+++ main/java/com/sun/grizzly/DefaultSelectionKeyHandler.java (working copy)
@@ -208,7 +208,7 @@
}
- long expire = getExpirationStamp(key);
+ long expire = getExpirationStamp(key.attachment());
if (expire != SelectionKeyAttachment.UNLIMITED_TIMEOUT){
if (currentTime - expire >= timeout) {
cancel(key);
Would you please review it?
Thanks.
--
Bongjae Chang