Alanxtl commented on code in PR #3592:
URL: https://github.com/apache/dubbo-go/pull/3592#discussion_r3840450634


##########
remoting/getty/getty_client.go:
##########
@@ -287,10 +282,12 @@ func (c *Client) transfer(session getty.Session, request 
*remoting.Request, time
        return totalLen, sendLen, perrors.WithStack(err)
 }
 
-func (c *Client) resetRpcConn() {
+func (c *Client) resetRpcConn(expected *gettyRPCClient) {
        c.gettyClientMux.Lock()
+       defer c.gettyClientMux.Unlock()
+       if c.gettyClient != expected {

Review Comment:
   已修改
   - 请求先完成 `WritePkg`。
   - 测试线程先持有 `gettyClientMux`。
   - 再启动 `Client.Close()`。
   - 锁释放前如果 `Close` 返回,测试立即失败。
   - 释放锁后再等待 timeout reset 和 Close 完成。
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to