Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
fdkevin0 committed Mar 9, 2022
1 parent 78962b0 commit e6550bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/net/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {
cobra.CheckErr(viper.BindPFlag("net.endpoint", Cmd.PersistentFlags().Lookup("endpoint")))

Cmd.PersistentFlags().StringP("acid", "a", "", "ac_id of srun")
resp, _, errs := gorequest.New().Get(viper.GetString("net.endpoint")).End()
resp, _, errs := gorequest.New().Get("http://www.baidu.com").End()
if errs != nil {
viper.SetDefault("net.acid", "0")
} else if acid := resp.Request.URL.Query().Get("ac_id"); acid != "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/srun/portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func New(endpoint, acID string) *PortalServer {
acID: acID,
jsonpCallback: "jQuery112403771213770126085_" + timestampStr,
timestampStr: timestampStr,
internetCheck: "https://www.baidu.com",
internetCheck: "http://www.baidu.com",
}
}

Expand Down

0 comments on commit e6550bc

Please sign in to comment.