+ Removed the fixed shutdown time + Added the configuration for the public web server + Refactored the old web server settings + Improved the handling of shutdown handlers. It is not save! + Bugfix: The server start was no longer blocking
23 lines
647 B
Go
23 lines
647 B
Go
package ICCC
|
|
|
|
import (
|
|
"container/list"
|
|
"github.com/SommerEngineering/Ocean/Log"
|
|
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
|
"github.com/SommerEngineering/Ocean/Tools"
|
|
)
|
|
|
|
func init() {
|
|
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Start init of ICCC.`)
|
|
defer Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Done init ICCC.`)
|
|
|
|
cacheListenerDatabase = list.New()
|
|
listeners = make(map[string]func(data map[string][]string))
|
|
|
|
// Using the local IP address:
|
|
correctAddressWithPort = Tools.LocalIPAddressAndPort()
|
|
|
|
initDB()
|
|
registerHost2Database()
|
|
}
|