Skip to content

Commit

Permalink
🎨 Improve data sync cloud storage availability check logic #10206
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 17, 2024
1 parent 9c703d0 commit 77db5c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/util/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 77db5c6

Please sign in to comment.