Fix memory race condition

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-09-24 14:06:02 -07:00
parent 578d47356d
commit 5f3ce30826
2 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ class PostBox {
init(pool: RelayPool) {
self.pool = pool
self.events = [:]
pool.register_handler(sub_id: "postbox", handler: handle_event)
Task { await pool.register_handler(sub_id: "postbox", handler: handle_event) }
}
// only works reliably on delay-sent events