Fix bug where we constantly cycled network stack when on network with PAC proxy.

This commit is contained in:
andrew-signal
2026-02-23 16:53:22 -05:00
committed by Cody Henthorne
parent 08509f6693
commit e636a94de0
3 changed files with 19 additions and 9 deletions

View File

@@ -74,6 +74,7 @@ import org.whispersystems.signalservice.api.svr.SvrBApi
import org.whispersystems.signalservice.api.username.UsernameApi
import org.whispersystems.signalservice.api.websocket.SignalWebSocket
import org.whispersystems.signalservice.api.websocket.WebSocketConnectionState
import org.whispersystems.signalservice.internal.configuration.HttpProxy
import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration
import org.whispersystems.signalservice.internal.push.PushServiceSocket
import java.util.function.Supplier
@@ -410,9 +411,9 @@ object AppDependencies {
networkModule.openConnections()
}
fun onSystemHttpProxyChange(host: String?, port: Int?): Boolean {
fun onSystemHttpProxyChange(systemHttpProxy: HttpProxy?): Boolean {
val currentSystemProxy = signalServiceNetworkAccess.getConfiguration().systemHttpProxy.orNull()
return if (currentSystemProxy?.host != host || currentSystemProxy?.port != port) {
return if (currentSystemProxy?.host != systemHttpProxy?.host || currentSystemProxy?.port != systemHttpProxy?.port) {
resetNetwork()
true
} else {