From 1f0cec542cfac95bbc9eaa3042285e7a3ce42ddc Mon Sep 17 00:00:00 2001 From: Ulf Bjorkengren Date: Thu, 2 Nov 2023 15:42:42 +0100 Subject: [PATCH] Issue#67: bug fix crash on subscribe error response. Signed-off-by: Ulf Bjorkengren --- utils/grcputils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/grcputils.go b/utils/grcputils.go index 63113232..ff967b95 100644 --- a/utils/grcputils.go +++ b/utils/grcputils.go @@ -496,10 +496,10 @@ func createSubscribeStreamPb(protoMessage *pb.SubscribeStreamMessage, messageMap if messageMap["action"] == "subscribe" { // RESPONSE protoMessage.MType = pb.SubscribeResponseType_RESPONSE protoMessage.Response = &pb.SubscribeStreamMessage_SubscribeResponseMessage{} - protoMessage.Response.SubscriptionId = messageMap["subscriptionId"].(string) protoMessage.Response.RequestId = messageMap["requestId"].(string) protoMessage.Response.Ts = messageMap["ts"].(string) if messageMap["error"] == nil { + protoMessage.Response.SubscriptionId = messageMap["subscriptionId"].(string) protoMessage.Status = pb.ResponseStatus_SUCCESS } else { protoMessage.Status = pb.ResponseStatus_ERROR