Skip to content

Commit

Permalink
Merge pull request #17 from UlfBj/master
Browse files Browse the repository at this point in the history
gRPC mgr bug fix.
  • Loading branch information
UlfBj authored Apr 5, 2024
2 parents 3704a2e + 08e00d3 commit 7725c16
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 7725c16

Please sign in to comment.