rpc: fix race on stream abort/finish and server side abort
Stream abort/finish can hang because we can receive abort message from server and yet sent abort/finish message to server. The latter will not be answered ever because after server sends abort message it forgets the stream and messages for unknown stream are simply ignored. We check for stream error at the very beginning of remoteStreamFinish/remoteStreamAbort but stream error can be set after the check in another thread operating on stream. Let's check for stream error under client lock similar to what's done in [1]. [1] 833b901c: stream: Check for stream EOF Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Showing
想要评论请 注册 或 登录