1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00

Use channels to communicate shutdown request

- httpd now uses shutdown channel
- smtpd now uses shutdown channel
- pop3d now uses shutdown channel
- timedExit now removes PID file
- tidy up some struct instantiations, var blocks
This commit is contained in:
James Hillyerd
2016-02-28 23:36:47 -08:00
parent 3a7be7d89c
commit 4b4121bb3a
8 changed files with 203 additions and 138 deletions

View File

@@ -411,7 +411,8 @@ func setupWebServer(ds smtpd.DataStore) *bytes.Buffer {
TemplateDir: "../themes/integral/templates",
PublicDir: "../themes/integral/public",
}
httpd.Initialize(cfg, ds)
shutdownChan := make(chan bool)
httpd.Initialize(cfg, ds, shutdownChan)
SetupRoutes(httpd.Router)
return buf