mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 06:05:29 +01:00
🎨 Data synchronization supports the multi-kernel online perception https://github.com/siyuan-note/siyuan/issues/8518
This commit is contained in:
parent
84d551bdd5
commit
4e643e6af8
3 changed files with 14 additions and 6 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue