fix(udp): логировать причину обрыва DTLS-сессии перед паузой

This commit is contained in:
samosvalishe
2026-09-22 00:02:48 +03:00
parent 5508cd65a7
commit caa8fea5bf
+3 -1
View File
@@ -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):
}
}
}