fix: Qr Code fix increasing network family timeout #2388
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Esse PR aumenta o timeout de seleção de tipo de rede. Com ele o QR Code gerará sem problemas e, também, não terá problemas com erros de download de mídia.
Trocar DNS e usar proxy pode até resolver por um período, mas quando a latência for mais que 250ms (configuração padrão do Node) nunca vai gerar QR, pois o node irá dar erro de ETIMEDOUT. Nesse meu PR eu aumento o timeout para 1000ms (1s) só por via das dúvidas, mas com 500ms também funciona.
Outra maneira de corrigir seria forçando o node a sempre usar IPV4, mas essa opção é em último caso, e pode ser feita ativando a flag:
--dns-result-order=ipv4first📋 Description
🔗 Related Issue
Closes #2378 #2378 #2173 #2374 #2090
🧪 Type of Change
🧪 Testing
📸 Screenshots (if applicable)
✅ Checklist
📝 Additional Notes