Propagate DcUpdateEach setting

This commit is contained in:
9seconds
2026-02-16 15:07:56 +01:00
parent 836a481026
commit 308e372a5d
9 changed files with 22 additions and 12 deletions
+1 -4
View File
@@ -1,7 +1,5 @@
package dc
import "time"
type preferIP uint8
const (
@@ -12,8 +10,7 @@ const (
)
const (
DefaultDC = 2
DefaultUpdateDCAddressesEach = time.Hour
DefaultDC = 2
defaultAppID = 123456
defaultAppHash = ""
-4
View File
@@ -37,10 +37,6 @@ func (t *Telegram) GetAddresses(dc int) []Addr {
}
func (t *Telegram) Run(ctx context.Context, updateEach time.Duration) {
if updateEach == 0 {
updateEach = DefaultUpdateDCAddressesEach
}
t.update(ctx)
ticker := time.NewTicker(updateEach)