https://issues.apache.org/bugzilla/show_bug.cgi?id=50467

--- Comment #3 from Steven Hugg <h...@fasterlight.com> 2010-12-16 17:06:55 EST 
---
I haven't reproduced it, but I would imagine that inserting a Thread.sleep()
after the call to key.attach(null) in cancelledKey() might do it.

For now I have just put a null check in the above loop like so:

                        if (attachment != null)
                        {
                            attachment.access();
                            iterator.remove();
                            processKey(sk, attachment);
                        } else {
                            log.warn("NioEndpoint: Attachment was null");
                            iterator.remove();
                        }

Not sure if that is correct, but better than the alternative ;)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to