File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/com/github/dockerjava/netty Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 44import io .netty .channel .Channel ;
55import io .netty .channel .ChannelFuture ;
66import io .netty .channel .ChannelFutureListener ;
7+ import io .netty .channel .socket .DuplexChannel ;
8+ import io .netty .channel .socket .SocketChannel ;
79import io .netty .handler .codec .http .DefaultFullHttpRequest ;
810import io .netty .handler .codec .http .DefaultHttpRequest ;
911import io .netty .handler .codec .http .FullHttpRequest ;
@@ -262,6 +264,12 @@ public void run() {
262264 channel .writeAndFlush (Unpooled .copiedBuffer (buffer , 0 , read ));
263265 }
264266
267+ // we close the writing side of the socket, but keep the read side open to transfer stdout/stderr
268+ // unfortunately, shutdownOutput is not supported by io.netty.channel.epoll.EpollDomainSocketChannel
269+ if (channel instanceof DuplexChannel ) {
270+ ((DuplexChannel ) channel ).shutdownOutput ();
271+ }
272+
265273 }
266274 }).start ();
267275 }
You can’t perform that action at this time.
0 commit comments