actors: Fix hive-actor-local? to check the hive id, not whether actor exists.
[8sync.git] / 8sync / systems / actors.scm
index 8545e73a7751b86f6dcfdbbe4e6662ac2f201cf6..9ba3818b6ff1d6f6e34b0ff33ae65ad8f29ca619 100644 (file)
@@ -642,7 +642,7 @@ more compact following syntax:
         (process-remote-message))))
 
 (define-method (hive-actor-local? (hive <hive>) address)
-  (hash-ref (hive-actor-registry hive) address))
+  (equal? (hive-id hive) (address-hive-id address)))
 
 (define-method (hive-register-actor! (hive <hive>) (actor <actor>))
   (hash-set! (hive-actor-registry hive) (actor-id actor) actor))