Fix a race condition in flushBuffer
flushBuffer() is used to send packets through TCP interconnect, before sending, it first check whether receiver stopped or teared down the interconnect, however, there is window between checking and sending, the receiver may tear down the interconnect and close the peer, so send() will report an error, to resolve this, we recheck whether the receiver stopped or teared down the interconnect in this window and don't error out in that case. Reviewed-by: NJinbao Chen <jinchen@pivotal.io> Reviewed-by: NHao Wu <hawu@pivotal.io>
Showing
想要评论请 注册 或 登录