fix(udp): логировать причину обрыва DTLS-сессии перед паузой
This commit is contained in:
1 parent
5508cd65a7
commit
caa8fea5bf
1 file changed
+3
-1
@@ -59,10 +59,12 @@ func DTLSLoop(ctx context.Context, deps *Deps, params *Params, peer *net.UDPAddr
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
wait := time.Duration(10+randx.Intn(20)) * time.Second
|
||||
deps.log().Warnf("[STREAM %d] DTLS: %v - повтор через %s", streamID, err, wait)
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case <-time.After(time.Duration(10+randx.Intn(20)) * time.Second):
|
||||
case <-time.After(wait):
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user