Why Netty 4 “proxy” example has to set channel “AUTO_READ” as false

后端 未结 1 555
北海茫月
北海茫月 2020-12-01 19:28

In Netty 4 \"proxy\" example, the channel auto read option has been disabled:

serverBootStrap.group(bossGroup, workerGroup)
    ...
    .childOption(ChannelO         


        
相关标签:
1条回答
  • 2020-12-01 20:16

    if you not set autoread to false you may get into trouble if one channel writes a lot of data before the other can consume it. As it's all asynchronous you may end up buffers to much data and hit OOME.

    0 讨论(0)
提交回复
热议问题