GitHub user zhangcunli closed a discussion: 双向流 BidiStreamForClient 的问题

 1. 我在使用 dubbo-go 的时候发现一个问题,请教一下:
    client:  dubbo-go: v3.2.0-rc2 
    server: dubbo v3.3.0
    registry: zookeeper
2. 双向流模式:CallBidiStream 
3. client: dubbo.NewInstance 方式创建客户端
4. 客户端代码: 其中 biStream 类型为:*triple_protocol.BidiStreamForClient
`       for ; ; {
                //1.receive triple server msg
                err := biStream.Receive(response)
                if err != nil {
                        break
                }
        }
`
5. 问题 1:biStream 客户端没有关闭长连接的接口;如果服务端不调用 onCompleted,那么 Receive 会永久 block;
                  客户端应当具有主动 Close 能力才对,底层使用的是 grpc,而 grpc 客户端是能够主动关闭连接的。

    问题 2:Java 服务端调用 onCompleted() 后,biStream.Receive 返回 EOF
                  **但是和服务端的 TCP 连接仍然存在;我知道 dubbo client 内部是连接池,但是我测试了一下,TCP 
连接似乎并没有被复用**


GitHub link: https://github.com/apache/dubbo-go/discussions/2756

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


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

Reply via email to