redef class ServerConfig
# Handle to retreive the `HttpFactory` on config change
- private var factory: HttpFactory
+ private var factory: HttpFactory is noinit
private init with_factory(factory: HttpFactory) do self.factory = factory
end
listeners_count[name, port] = 1
end
else
- listeners_count[name, port] += 1
+ var value = listeners_count[name, port].as(not null)
+ listeners_count[name, port] = value + 1
end
interfac.registered = true
redef fun add(e)
do
super
- if vh.server_config != null then sys.listen_on(e, vh.server_config.factory)
+ var config = vh.server_config
+ if config != null then sys.listen_on(e, config.factory)
end
# TODO remove