Fix threading issue on listener notification (#28730)

This is a fix for #28729. Currently if a write operation is not properly
queued with a selector we notify the listener. However, we are doing
this by calling a method that is only meant for the selector thread to
call. This commit fixes that issue.
This commit is contained in:
Tim Brooks 2018-02-19 12:13:00 -07:00 committed by GitHub
parent ff2164c4f9
commit 9215363708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,7 @@ public class SocketSelector extends ESSelector {
if (isOpen() == false) {
boolean wasRemoved = queuedWrites.remove(writeOperation);
if (wasRemoved) {
executeFailedListener(writeOperation.getListener(), new ClosedSelectorException());
writeOperation.getListener().accept(null, new ClosedSelectorException());
}
} else {
wakeup();