Tencent / TubeMQ

TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong
https://inlong.apache.org/
2.02k stars 388 forks source link

Fix a vulnerability when NettyClient sent data encountered an exception #142

Closed gosonzhang closed 4 years ago

gosonzhang commented 4 years ago

This bug fix mainly addresses the following 3 situations:

  1. NettyClient may have been closed when sending;
  2. An exception is thrown during the sending process, and the request may have been removed;
  3. During the sending process, the exception is thrown,the request still exists, but the exception causes are different;the sending logic with the callback function needs to clear the timeout event to handle the exception.

    此错误修复主要解决以下3种情况:

  4. NettyClient发送时可能已经关闭; 2.在发送过程中引发异常,并且该请求可能已被删除; 3.在发送过程中,抛出异常,请求仍然存在,但异常原因不同;带有回调函数的发送逻辑需要清除超时事件以处理异常。
lizhiboo commented 4 years ago

+1