Use libsignal Net without proxy on rejection

This commit is contained in:
Alex Bakon 2025-02-18 23:10:01 -05:00 committed by GitHub
commit f7f1052246
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1728,7 +1728,12 @@ export function initialize({
libsignalNet.setIpv6Enabled(!disableIPv6);
if (proxyUrl) {
log.info('Setting libsignal proxy');
libsignalNet.setProxyFromUrl(proxyUrl);
try {
libsignalNet.setProxyFromUrl(proxyUrl);
} catch (error) {
log.error(`Failed to set proxy: ${error}`);
libsignalNet.clearProxy();
}
}
// Thanks to function-hoisting, we can put this return statement before all of the