1 parent c5c4acd commit 138d5d9Copy full SHA for 138d5d9
1 file changed
internal/client/ws_message_handler.go
@@ -99,6 +99,12 @@ func (c *WSClient) handleMessage(resp *deployPB.NotifyResponse) {
99
return
100
101
case deployPB.Type_CONNECT:
102
+ // 后端建立连接后会发送不带 payload 的欢迎通知;这不是连接测试请求。
103
+ // 只有携带 connectRequest 时才执行 provider 连接测试。
104
+ if resp.Data == nil {
105
+ logger.Debug("收到 WebSocket 连接确认通知", "requestId", resp.RequestId)
106
+ return
107
+ }
108
if connectReq, ok := resp.Data.(*deployPB.NotifyResponse_ConnectRequest); ok {
109
if connectReq.ConnectRequest == nil {
110
logger.Warn("连接测试消息缺少 payload", "requestId", resp.RequestId)
0 commit comments