Fix raw_dc_id for test DC.
GitOrigin-RevId: 2fd4d78700d245b91a6b390df26568d910cbae37
This commit is contained in:
parent
e29f883c8f
commit
d9a89abd23
@ -651,7 +651,11 @@ void ConnectionCreator::client_loop(ClientInfo &client) {
|
|||||||
auto r_socket_fd = [&, dc_id = client.dc_id]() -> Result<SocketFd> {
|
auto r_socket_fd = [&, dc_id = client.dc_id]() -> Result<SocketFd> {
|
||||||
TRY_RESULT(info, dc_options_set_.find_connection(dc_id, allow_media_only, use_proxy));
|
TRY_RESULT(info, dc_options_set_.find_connection(dc_id, allow_media_only, use_proxy));
|
||||||
stat = info.stat;
|
stat = info.stat;
|
||||||
int16 raw_dc_id = narrow_cast<int16>(info.option->is_media_only() ? -dc_id.get_raw_id() : dc_id.get_raw_id());
|
int32 int_dc_id = dc_id.get_raw_id();
|
||||||
|
if (G()->is_test_dc()) {
|
||||||
|
int_dc_id += 10000;
|
||||||
|
}
|
||||||
|
int16 raw_dc_id = narrow_cast<int16>(info.option->is_media_only() ? -int_dc_id : int_dc_id);
|
||||||
|
|
||||||
if (use_mtproto_proxy) {
|
if (use_mtproto_proxy) {
|
||||||
TRY_RESULT(secret, hex_decode(proxy->secret()));
|
TRY_RESULT(secret, hex_decode(proxy->secret()));
|
||||||
|
Reference in New Issue
Block a user