Make delete-role idempotent
This commit is contained in:
parent
c278e10673
commit
523446fa71
5
os2.rkt
5
os2.rkt
|
@ -193,6 +193,8 @@
|
|||
hs))]))
|
||||
|
||||
(define (do-unsubscribe pid eid reason state)
|
||||
(cond
|
||||
[(hash-has-key? (vm-endpoints state) eid)
|
||||
(define endpoint-to-remove (hash-ref (vm-endpoints state) eid))
|
||||
(define removed-topic (endpoint-topic endpoint-to-remove))
|
||||
(define old-process (hash-ref (vm-processes state) pid))
|
||||
|
@ -216,7 +218,8 @@
|
|||
(handlers-absence (endpoint-handlers e))
|
||||
matching-eid
|
||||
outbound-flow
|
||||
reason))))
|
||||
reason)))]
|
||||
[else state]))
|
||||
|
||||
(define (route-and-deliver message-topic body state)
|
||||
(define pids-and-endpoints
|
||||
|
|
Loading…
Reference in New Issue