From 77db5c6ca2ee741958686b4d2947827065cd8b36 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 17 Jan 2024 16:51:01 +0800 Subject: [PATCH] :art: Improve data sync cloud storage availability check logic https://github.com/siyuan-note/siyuan/pull/10206 --- kernel/util/net.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/util/net.go b/kernel/util/net.go index f681ffd3cc9..d1dbc80d518 100644 --- a/kernel/util/net.go +++ b/kernel/util/net.go @@ -100,11 +100,11 @@ func isOnline(checkURL string, skipTlsVerify bool) (ret bool) { for i := 0; i < 3; i++ { resp, err := c.R().Get(checkURL) - - if resp.StatusCode == 401 { + if 401 == resp.StatusCode { + // Improve data sync cloud storage availability check logic https://github.com/siyuan-note/siyuan/pull/10206 return true } - + if resp.GetHeader("Location") != "" { return true }