Warn when too many canonical-host records exist
This commit is contained in:
parent
1c7b80606d
commit
a5cdd5b12f
|
@ -24,10 +24,19 @@
|
|||
(spawn-configuration filename)])
|
||||
|
||||
(actor #:name 'main
|
||||
|
||||
(during (config (list 'canonical-host $h $p))
|
||||
(assert (canonical-local-host h p))
|
||||
(assert (local-host h p)))
|
||||
|
||||
(define/query-set canonical-local-hosts ($ c (canonical-local-host _ _)) c)
|
||||
(stop-when (rising-edge (> (set-count (canonical-local-hosts)) 1))
|
||||
(log-error "Too many canonical-host records in configuration."))
|
||||
;; TODO: Make the too-many-canonical-host-records situation recoverable.
|
||||
;; TODO: And/or, make the whole application quit when it gets into a bad state.
|
||||
|
||||
(during (config (list 'accepted-host $h $p))
|
||||
(assert (local-host h p)))
|
||||
|
||||
(during (local-host $host-name $port)
|
||||
(assert (vh host-name port))))
|
||||
|
|
Loading…
Reference in New Issue