diff --git a/syndicate/broker/federation2.rkt b/syndicate/broker/federation2.rkt index f00f12c..6452a19 100644 --- a/syndicate/broker/federation2.rkt +++ b/syndicate/broker/federation2.rkt @@ -93,10 +93,10 @@ localid connid (lambda (sub) (define new-holders (hash-remove (subscription-holders sub) connid)) - (specs (hash-remove (specs) (subscription-spec sub))) - (subs (if (hash-empty? new-holders) - (hash-remove (subs) localid) - (hash-set (subs) localid (struct-copy subscription sub + (if (hash-empty? new-holders) + (begin (specs (hash-remove (specs) (subscription-spec sub))) + (subs (hash-remove (subs) localid))) + (subs (hash-set (subs) localid (struct-copy subscription sub [holders new-holders])))) ;; The messages we send depend on (hash-count new-holders):