You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes when you get a Selector from SelectorPool, it already had old keys in it, which causes issues like jruby/jruby-openssl#93 that me and @kares were working on. Something somewhere is returning selectors to the pool without cleaning up its keys properly, I think possibly this line (perhaps the key needs to be cancelled even if its invalid or it may still show up in selectedKeys() under certain conditions?)
Instead of repeating the key-cleaning code in (at least) the 3 places in jruby and jruby-openssl, I figure the best fix is to do the cleaning inside of SelectorPool#put, so its only done in one place, and done correctly. I've put together #3952 which does this, and have been running it in production and its completely fixed this issue, and I don't see any Selectors with old keys any more, and haven't seen any unwanted side effects
The text was updated successfully, but these errors were encountered:
Sometimes when you get a
Selector
fromSelectorPool
, it already had old keys in it, which causes issues like jruby/jruby-openssl#93 that me and @kares were working on. Something somewhere is returning selectors to the pool without cleaning up its keys properly, I think possibly this line (perhaps the key needs to be cancelled even if its invalid or it may still show up inselectedKeys()
under certain conditions?)Instead of repeating the key-cleaning code in (at least) the 3 places in jruby and jruby-openssl, I figure the best fix is to do the cleaning inside of
SelectorPool#put
, so its only done in one place, and done correctly. I've put together #3952 which does this, and have been running it in production and its completely fixed this issue, and I don't see anySelector
s with old keys any more, and haven't seen any unwanted side effectsThe text was updated successfully, but these errors were encountered: