From 967c10b25ca55657ed1bb7cfb6cbb217c01bbf27 Mon Sep 17 00:00:00 2001 From: teidesu <86301490+teidesu@users.noreply.github.com> Date: Tue, 28 Jun 2022 23:13:56 +0300 Subject: [PATCH] fix(core): never use ipv6 dc when not using ipv6 --- packages/core/src/base-client.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/src/base-client.ts b/packages/core/src/base-client.ts index 7c0f3a7f..527c8758 100644 --- a/packages/core/src/base-client.ts +++ b/packages/core/src/base-client.ts @@ -576,12 +576,14 @@ export class BaseTelegramClient extends EventEmitter { it.id === id && it.mediaOnly && it.cdn === cdn && - !it.tcpoOnly + !it.tcpoOnly && + !it.ipv6 ) } if (!found) found = this._config.dcOptions.find( - (it) => it.id === id && it.cdn === cdn && !it.tcpoOnly + (it) => + it.id === id && it.cdn === cdn && !it.tcpoOnly && !it.ipv6 ) if (found) return found