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

This commit is contained in:
Daniel 2023-06-12 08:25:16 +08:00
parent 84d551bdd5
commit 4e643e6af8
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 14 additions and 6 deletions

View file

@ -372,6 +372,10 @@ func SetSyncEnable(b bool) {
}
func SetSyncPerception(b bool) {
if util.ContainerDocker == util.Container {
b = false
}
Conf.Sync.Perception = b
Conf.Save()
@ -717,16 +721,16 @@ func connectSyncWebSocket() {
reconnected := false
for retries := 0; retries < 7; retries++ {
time.Sleep(7 * time.Second)
logging.LogWarnf("reconnecting sync websocket...")
//logging.LogInfof("reconnecting sync websocket...")
webSocketConn, dialErr = dialSyncWebSocket()
if nil != dialErr {
logging.LogWarnf("reconnect sync websocket failed: %s", dialErr)
continue
} else {
logging.LogInfof("sync websocket reconnected")
reconnected = true
break
}
logging.LogInfof("sync websocket reconnected")
reconnected = true
break
}
if !reconnected {
logging.LogWarnf("reconnect sync websocket failed, do not retry")