Confine subscriptions and messages to the nested VM

This commit is contained in:
Tony Garnock-Jones 2013-11-04 11:46:54 -05:00
parent 58ed6377d4
commit 4be94e1314
1 changed files with 3 additions and 2 deletions

View File

@ -111,11 +111,12 @@
(match m
[(message (websocket-message from to data) 1 #f)
(match (drop-json-action (string->jsexpr data))
[(routing-update rs)
[(routing-update rs-unfiltered)
(define rs (filter (lambda (r) (zero? (route-meta-level r))) rs-unfiltered))
(transition (struct-copy connection-state s [tunnelled-routes rs])
(routing-update (append rs relay-connections)))]
[(? message? m)
(transition s m)]
(transition s (if (zero? (message-meta-level m)) m '()))]
['ping
(transition s (send-event 'pong s))]
['pong