Make sure Future get notified before event is fired. See #254
This commit is contained in:
parent
db87c6ea37
commit
33c085b9b9
@ -110,13 +110,13 @@ class OioWorker extends AbstractOioWorker<OioSocketChannel> {
|
|||||||
a.getBytes(a.readerIndex(), out, length);
|
a.getBytes(a.readerIndex(), out, length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
future.setSuccess();
|
||||||
if (iothread) {
|
if (iothread) {
|
||||||
fireWriteComplete(channel, length);
|
fireWriteComplete(channel, length);
|
||||||
} else {
|
} else {
|
||||||
fireWriteCompleteLater(channel, length);
|
fireWriteCompleteLater(channel, length);
|
||||||
}
|
}
|
||||||
future.setSuccess();
|
|
||||||
|
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
// Convert 'SocketException: Socket closed' to
|
// Convert 'SocketException: Socket closed' to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user