Use separate thread to send packets, even in sync mode (fixes #674)
This commit is contained in:
@@ -137,13 +137,13 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
LOGGER.info("Initialized quick replay sender in " + (System.currentTimeMillis() - start) + "ms");
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error("Initializing quick replay sender:", e);
|
||||
mod.getCore().runLater(() -> {
|
||||
mod.getCore().runLaterWithoutLock(() -> {
|
||||
mod.getCore().printWarningToChat("Error initializing quick replay sender: %s", e.getLocalizedMessage());
|
||||
promise.setException(e);
|
||||
});
|
||||
return;
|
||||
}
|
||||
mod.getCore().runLater(() -> promise.set(null));
|
||||
mod.getCore().runLaterWithoutLock(() -> promise.set(null));
|
||||
}).start();
|
||||
return promise;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user