Cope with add-role after kill of a process

This commit is contained in:
Tony Garnock-Jones 2012-03-24 21:18:09 -04:00
parent ad8a31f703
commit e18b1f2a8c
1 changed files with 42 additions and 39 deletions

View File

@ -251,6 +251,8 @@
[(kill pid-to-kill reason) (do-kill (or pid-to-kill pid) reason state)]))
(define (do-subscribe pid topic hs k state)
(cond
[(hash-has-key? (vm-processes state) pid)
(define old-process (hash-ref (vm-processes state) pid))
(define eid-number (process-next-eid-number old-process))
(define new-eid (list pid eid-number))
@ -289,7 +291,8 @@
new-eid
(endpoint new-eid
topic
hs))]))
hs))])]
[else state]))
(define (do-unsubscribe pid eid reason state)
(cond