Skip to content

Commit

Permalink
consumes more data
Browse files Browse the repository at this point in the history
  • Loading branch information
z4yx committed May 1, 2020
1 parent f0c8af5 commit e1af8be
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ func keepAliveLoop(c *cli.Context, campusOnly bool) (ret error) {
return
}
targetInside := "https://www.tsinghua.edu.cn/"
// Response length must be greater than 1MB, or net.tsinghua may ignore that
targetOutside := "http://mirrors.aliyun.com/ubuntu/dists/focal/main/binary-amd64/Packages.gz"
targetOutside := "http://www.baidu.com/"

stop := make(chan int, 1)
defer func() { stop <- 1 }()
Expand All @@ -199,8 +198,8 @@ func keepAliveLoop(c *cli.Context, campusOnly bool) (ret error) {
fmt.Printf("Failed to access %s, you have to re-login.\n", v4Target)
break
}
// Typically the Idle-Timeout on net.tsinghua is 4.5 hours
time.Sleep(2 * time.Hour)
// Consumes ~70MB per day
time.Sleep(9 * time.Second)
}
return
}
Expand Down

0 comments on commit e1af8be

Please sign in to comment.