mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 09:28:27 +00:00
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:
parent
ff2164c4f9
commit
9215363708
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user