Skip to content

Commit

Permalink
Minor log info adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
yosebyte authored Dec 17, 2024
1 parent 8d57000 commit 60440e0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/passport/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func authSetups(parsedURL *url.URL, whiteList *sync.Map, tlsConfig *tls.Config)
for {
if err := internal.HandleHTTP(parsedAuthURL, whiteList, tlsConfig); err != nil {
log.Error("Auth mode error: %v", err)
log.Info("Restarting in 1s...")
time.Sleep(1 * time.Second)
log.Info("Auth mode restarted")
continue
}
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/passport/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func runServer(parsedURL *url.URL, rawURL string, whiteList *sync.Map, tlsConfig
for {
if err := tunnel.Server(parsedURL, whiteList, tlsConfig); err != nil {
log.Error("Server core error: %v", err)
log.Info("Restarting in 1s...")
time.Sleep(1 * time.Second)
log.Info("Server core restarted")
}
}
}
Expand All @@ -43,8 +43,8 @@ func runClient(parsedURL *url.URL, rawURL string) {
for {
if err := tunnel.Client(parsedURL); err != nil {
log.Error("Client core error: %v", err)
log.Info("Restarting in 1s...")
time.Sleep(1 * time.Second)
log.Info("Client core restarted")
}
}
}
Expand All @@ -54,8 +54,8 @@ func runBroker(parsedURL *url.URL, rawURL string, whiteList *sync.Map) {
for {
if err := forward.Broker(parsedURL, whiteList); err != nil {
log.Error("Broker core error: %v", err)
log.Info("Restarting in 1s...")
time.Sleep(1 * time.Second)
log.Info("Broker core restarted")
}
}
}
1 change: 0 additions & 1 deletion internal/tunnel/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func ServeTCP(parsedURL *url.URL, whiteList *sync.Map, targetTCPListen *net.TCPL
for {
select {
case <-done:
log.Warn("TCP server received shutdown signal")
return nil
default:
targetConn, err := targetTCPListen.AcceptTCP()
Expand Down
1 change: 0 additions & 1 deletion internal/tunnel/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ func ServeUDP(parsedURL *url.URL, whiteList *sync.Map, targetUDPConn *net.UDPCon
for {
select {
case <-done:
log.Warn("UDP server received shutdown signal")
return nil
default:
buffer := make([]byte, internal.MaxDataBuffer)
Expand Down

0 comments on commit 60440e0

Please sign in to comment.