hack to give backend 100ms to really get going
This commit is contained in:
parent
85270b9b69
commit
7e6d6acc5f
11
web.go
11
web.go
|
@ -2325,6 +2325,15 @@ func enditall() {
|
||||||
|
|
||||||
var preservehooks []func()
|
var preservehooks []func()
|
||||||
|
|
||||||
|
func wait100ms() chan struct{} {
|
||||||
|
c := make(chan struct{})
|
||||||
|
go func() {
|
||||||
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
close(c)
|
||||||
|
}()
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
|
||||||
func serve() {
|
func serve() {
|
||||||
db := opendatabase()
|
db := opendatabase()
|
||||||
login.Init(db)
|
login.Init(db)
|
||||||
|
@ -2337,6 +2346,7 @@ func serve() {
|
||||||
go enditall()
|
go enditall()
|
||||||
go redeliverator()
|
go redeliverator()
|
||||||
go tracker()
|
go tracker()
|
||||||
|
w100 := wait100ms()
|
||||||
|
|
||||||
getconfig("debug", &debugMode)
|
getconfig("debug", &debugMode)
|
||||||
readviews = templates.Load(debugMode,
|
readviews = templates.Load(debugMode,
|
||||||
|
@ -2364,6 +2374,7 @@ func serve() {
|
||||||
}
|
}
|
||||||
loadAvatarColors()
|
loadAvatarColors()
|
||||||
}
|
}
|
||||||
|
<-w100
|
||||||
|
|
||||||
for _, h := range preservehooks {
|
for _, h := range preservehooks {
|
||||||
h()
|
h()
|
||||||
|
|
Loading…
Reference in New Issue