@Override public void dispose() { channel.dispose(); }
@Override protected void hookFinally(SignalType type) { if (type != SignalType.CANCEL) { channelDisposable.dispose(); } } }
@Override protected void hookFinally(SignalType type) { if (type != SignalType.CANCEL) { channelDisposable.dispose(); } } }
@Override public void dispose() { channel.dispose(); }
/** * Release or close the underlying {@link Channel} in a blocking fashion */ default void disposeNow(Duration timeout) { if (isDisposed()) { return; } dispose(); try { onDispose().block(timeout); } catch (Exception e) { throw new IllegalStateException("Socket couldn't be stopped within " + timeout.toMillis() + "ms"); } }
/** * Release or close the underlying {@link Channel} in a blocking fashion */ default void disposeNow(Duration timeout) { if (isDisposed()) { return; } dispose(); try { onDispose().block(timeout); } catch (Exception e) { throw new IllegalStateException("Socket couldn't be stopped within " + timeout.toMillis() + "ms"); } }