mirror of
https://github.com/1f349/violet.git
synced 2024-11-23 11:51:37 +00:00
Shutdown websocket server first
This commit is contained in:
parent
f3c641b82d
commit
eddef80671
@ -159,6 +159,9 @@ func normalLoad(startUp startUpConfig, wd string) {
|
|||||||
exit_reload.ExitReload("Violet", func() {
|
exit_reload.ExitReload("Violet", func() {
|
||||||
allCompilables.Compile()
|
allCompilables.Compile()
|
||||||
}, func() {
|
}, func() {
|
||||||
|
// close websockets first
|
||||||
|
ws.Shutdown()
|
||||||
|
|
||||||
// close http servers
|
// close http servers
|
||||||
if srvApi != nil {
|
if srvApi != nil {
|
||||||
srvApi.Close()
|
srvApi.Close()
|
||||||
@ -169,6 +172,5 @@ func normalLoad(startUp startUpConfig, wd string) {
|
|||||||
if srvHttps != nil {
|
if srvHttps != nil {
|
||||||
srvHttps.Close()
|
srvHttps.Close()
|
||||||
}
|
}
|
||||||
ws.Shutdown()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user