Remove wrong migrate prefixes.

GitOrigin-RevId: c42b3dd184d6da5b3316d36e4de409ee2e931965
This commit is contained in:
levlam 2020-03-30 21:03:25 +03:00
parent f0d22df81f
commit 10b1ac1c8a

View File

@ -297,8 +297,7 @@ NetQueryDispatcher::~NetQueryDispatcher() = default;
void NetQueryDispatcher::try_fix_migrate(NetQueryPtr &net_query) { void NetQueryDispatcher::try_fix_migrate(NetQueryPtr &net_query) {
auto msg = net_query->error().message(); auto msg = net_query->error().message();
static constexpr CSlice prefixes[] = {"PHONE_MIGRATE_", "NETWORK_MIGRATE_", "USER_MIGRATE_", "FILE_MIGRATE_", static constexpr CSlice prefixes[] = {"PHONE_MIGRATE_", "NETWORK_MIGRATE_", "USER_MIGRATE_"};
"STATS_MIGRATE_"};
for (auto &prefix : prefixes) { for (auto &prefix : prefixes) {
if (msg.substr(0, prefix.size()) == prefix) { if (msg.substr(0, prefix.size()) == prefix) {
int32 new_main_dc_id = to_integer<int32>(msg.substr(prefix.size())); int32 new_main_dc_id = to_integer<int32>(msg.substr(prefix.size()));