Skip to content

Commit

Permalink
More blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Aug 21, 2023
1 parent 193cb38 commit f1521c2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.google.common.util.concurrent.Uninterruptibles;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
Expand Down Expand Up @@ -180,7 +181,9 @@ private CompletableFuture<FullHttpResponse> buildAndSendRequest(HttpMethod metho
request.headers().set(HttpHeaderNames.HOST, url.getHost());

// Send the HTTP request.
client.writeAndFlush(request).awaitUninterruptibly();
ChannelFuture channelFuture = client.writeAndFlush(request).awaitUninterruptibly();
channelFuture.syncUninterruptibly();
channelFuture.channel().closeFuture().syncUninterruptibly();

return result;
}
Expand Down

0 comments on commit f1521c2

Please sign in to comment.