From f21c6c824c8b2fcb14a174ad6d2ecc968111bd40 Mon Sep 17 00:00:00 2001 From: Ismail Akram Date: Mon, 20 May 2024 17:50:53 +0500 Subject: [PATCH] Do not delete registration id in session on Invocation --- lib/wampproto/session.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wampproto/session.rb b/lib/wampproto/session.rb index 994eb73..54752b6 100644 --- a/lib/wampproto/session.rb +++ b/lib/wampproto/session.rb @@ -77,7 +77,7 @@ def receive_message(msg) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize raise ValueError, error_message unless registrations.delete(registration_id) when Message::Invocation error_message = "received INVOCATION for invalid registration_id" - raise ValueError, error_message unless registrations.delete(msg.registration_id) + raise ValueError, error_message unless registrations.include?(msg.registration_id) invocation_requests[msg.request_id] = msg.request_id when Message::Published