Skip to content

Commit

Permalink
gRPC mgr bug fix.
Browse files Browse the repository at this point in the history
Signed-off-by: Ulf Bjorkengren <[email protected]>
  • Loading branch information
UlfBj committed Apr 5, 2024
1 parent 1ccefdc commit 0be4352
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/vissv2server/grpcMgr/grpcMgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ func getSubscriptionId(resp string) string {
utils.Error.Printf("getSubscriptionId:Unmarshal error data=%s, err=%s", resp, err)
return ""
}
if respMap["subscriptionId"] == nil {
return""
}
return respMap["subscriptionId"].(string)
}

Expand Down Expand Up @@ -261,6 +264,9 @@ func (s *Server) SubscribeRequest(in *pb.SubscribeRequestMessage, stream pb.VISS
resetGrpcRoutingData(subscribeClientId)
return nil
case vssResp := <-grpcResponseChan: // forward subscribe response and following events
if strings.Contains(vssResp, `"error"`) { // error message
return nil
}
if strings.Contains(vssResp, KILL_MESSAGE) { //issued by unsubscribe thread
clientId := extractClientId(vssResp)
resetGrpcRoutingData(clientId)
Expand Down

0 comments on commit 0be4352

Please sign in to comment.