Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/17228

Danield6182c431d8f
diff --git a/kernel/model/sync.go b/kernel/model/sync.go
index f099aa931e..bc4eb07855 100644
--- a/kernel/model/sync.go
+++ b/kernel/model/sync.go
@@ -730,27 +730,23 @@ func planSyncAfter(d time.Duration) {
func isProviderOnline(byHand bool) (ret bool) {
var checkURL string
skipTlsVerify := false
- timeout := 3000
switch Conf.Sync.Provider {
case conf.ProviderSiYuan:
checkURL = util.GetCloudSyncServer()
case conf.ProviderS3:
checkURL = Conf.Sync.S3.Endpoint
skipTlsVerify = Conf.Sync.S3.SkipTlsVerify
- timeout = Conf.Sync.S3.Timeout * 1000
case conf.ProviderWebDAV:
checkURL = Conf.Sync.WebDAV.Endpoint
skipTlsVerify = Conf.Sync.WebDAV.SkipTlsVerify
- timeout = Conf.Sync.WebDAV.Timeout * 1000
case conf.ProviderLocal:
checkURL = "file://" + Conf.Sync.Local.Endpoint
- timeout = Conf.Sync.Local.Timeout * 1000
default:
logging.LogWarnf("unknown provider: %d", Conf.Sync.Provider)
return false
}
- if ret = util.IsOnline(checkURL, skipTlsVerify, timeout); !ret {
+ if ret = util.IsOnline(checkURL, skipTlsVerify, 7000); !ret {
if 1 > autoSyncErrCount || byHand {
util.PushErrMsg(Conf.Language(76)+" (Provider: "+conf.ProviderToStr(Conf.Sync.Provider)+")", 5000)
}