@Override public RPromise<T> sync() throws InterruptedException { promise.sync(); return this; }
@Override public RPromise<T> sync() throws InterruptedException { promise.sync(); return this; }
@Override public Promise<T> sync() throws InterruptedException { return delegate.sync(); }
public void testBufRelease(ServerBootstrap sb, Bootstrap cb) throws Throwable { BufWriterHandler serverHandler = new BufWriterHandler(); BufWriterHandler clientHandler = new BufWriterHandler(); sb.childHandler(serverHandler); cb.handler(clientHandler); Channel sc = sb.bind().sync().channel(); Channel cc = cb.connect(sc.localAddress()).sync().channel(); // Ensure the server socket accepted the client connection *and* initialized pipeline successfully. serverHandler.channelFuture.sync(); // and then close all sockets. sc.close().sync(); cc.close().sync(); serverHandler.check(); clientHandler.check(); serverHandler.release(); clientHandler.release(); }
serverDonePromise.sync(); sh.channel.close().sync(); ch.channel.close().sync();