Closed flashmob closed 7 years ago
Since the config can change, another thing to take into account would be thread safety. This should be handy https://golang.org/pkg/sync/atomic/#example_Value_config
To make it easier, old connections will still use existing config. Subsequent new connections will use the new config.
First draft https://github.com/flashmob/go-guerrilla/pull/19
Currently working on it. Hope to have the following features when a SIG_HUP is caught:
That way the server can continue working without disrupting the hundreds of connections it may have open.
Going to implement it using an event based approach using https://github.com/asaskevich/EventBus