Add #:hook to spawn-broker-server-connection

This commit is contained in:
Tony Garnock-Jones 2016-11-30 10:19:56 +13:00
parent 78cb6f0c02
commit c2ece35bf9
1 changed files with 4 additions and 1 deletions

View File

@ -48,8 +48,11 @@
(resource-path->string (web-resource-path http-resource))))
(lambda (v) (broker-data scope v)))
(define (spawn-broker-server-connection req-id http-req #:scope [scope (http-req->scope http-req)])
(define (spawn-broker-server-connection req-id http-req
#:scope [scope (http-req->scope http-req)]
#:hook [hook void])
(actor #:name (list 'broker:connection req-id)
(hook)
(on-start (log-syndicate-broker-info "Starting broker connection ~v" req-id))
(on-stop (log-syndicate-broker-info "Ending broker connection ~v" req-id))