fix:hash key不存在问题

This commit is contained in:
李鹏军 2024-05-27 17:29:51 +08:00
parent 5712f567df
commit b4bcb377ec

View File

@ -30,7 +30,7 @@ public class CapFilter : SubscribeFilter
if (!string.IsNullOrEmpty(argumentJsonStr)) if (!string.IsNullOrEmpty(argumentJsonStr))
{ {
var hash = context.DeliverMessage.Headers["sjzy-arguments-hash"]; context.DeliverMessage.Headers.TryGetValue("sjzy-arguments-hash", out var hash);
if (hash.IsNullOrEmpty()) // 计算参数hash if (hash.IsNullOrEmpty()) // 计算参数hash
{ {
hash = GetHash(argumentJsonStr); hash = GetHash(argumentJsonStr);