mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-20 01:06:45 +00:00
add some logs
This commit is contained in:
@@ -960,14 +960,16 @@ func (s *Server) sendLogoutRequestWithConfig(ctx context.Context, config *profil
|
|||||||
}
|
}
|
||||||
|
|
||||||
func waitStateShift(ctx context.Context) {
|
func waitStateShift(ctx context.Context) {
|
||||||
timer := time.NewTimer(3 * time.Second)
|
timer := time.NewTimer(5 * time.Second)
|
||||||
defer timer.Stop()
|
defer timer.Stop()
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
log.Warnf("context done while waiting for state shift: %v", ctx.Err())
|
||||||
timer.Stop()
|
timer.Stop()
|
||||||
return
|
return
|
||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
|
log.Warnf("state shift timed out")
|
||||||
timer.Stop()
|
timer.Stop()
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
@@ -977,6 +979,7 @@ func waitStateShift(ctx context.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if status != internal.StatusConnecting {
|
if status != internal.StatusConnecting {
|
||||||
|
log.Infof("state shifting status: %v", status)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user