Confine subscriptions and messages to the nested VM
This commit is contained in:
parent
58ed6377d4
commit
4be94e1314
|
@ -111,11 +111,12 @@
|
||||||
(match m
|
(match m
|
||||||
[(message (websocket-message from to data) 1 #f)
|
[(message (websocket-message from to data) 1 #f)
|
||||||
(match (drop-json-action (string->jsexpr data))
|
(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])
|
(transition (struct-copy connection-state s [tunnelled-routes rs])
|
||||||
(routing-update (append rs relay-connections)))]
|
(routing-update (append rs relay-connections)))]
|
||||||
[(? message? m)
|
[(? message? m)
|
||||||
(transition s m)]
|
(transition s (if (zero? (message-meta-level m)) m '()))]
|
||||||
['ping
|
['ping
|
||||||
(transition s (send-event 'pong s))]
|
(transition s (send-event 'pong s))]
|
||||||
['pong
|
['pong
|
||||||
|
|
Loading…
Reference in New Issue