🎨 Data synchronization supports the multi-kernel online perception https://github.com/siyuan-note/siyuan/issues/8518

This commit is contained in:
Daniel 2023-06-11 22:53:37 +08:00
parent 5cad47203a
commit 9916211477
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 83 additions and 14 deletions

View file

@ -469,7 +469,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
if !force {
if Conf.Sync.Enabled && 3 != Conf.Sync.Mode &&
((IsSubscriber() && conf.ProviderSiYuan == Conf.Sync.Provider) || conf.ProviderSiYuan != Conf.Sync.Provider) {
syncData(true, false)
syncData(true, false, false)
if 0 != ExitSyncSucc {
exitCode = 1
return
@ -509,6 +509,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
time.Sleep(4 * time.Second)
}
logging.LogInfof("exited kernel")
webSocketConn.Close()
util.WebSocketServer.Close()
go func() {
time.Sleep(500 * time.Millisecond)