mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
Desktop: recreate http agent when the protocol changes (#5016)
This commit is contained in:
parent
a7e67952b8
commit
7c45b95f6f
@ -487,13 +487,12 @@ function shimInit(sharp = null, keytar = null, React = null, appVersion = null)
|
||||
maxSockets: 1,
|
||||
keepAliveMsecs: 5000,
|
||||
};
|
||||
if (url.startsWith('https')) {
|
||||
shim.httpAgent_ = new https.Agent(AgentSettings);
|
||||
} else {
|
||||
shim.httpAgent_ = new http.Agent(AgentSettings);
|
||||
}
|
||||
shim.httpAgent_ = {
|
||||
http: new http.Agent(AgentSettings),
|
||||
https: new https.Agent(AgentSettings),
|
||||
};
|
||||
}
|
||||
return shim.httpAgent_;
|
||||
return url.startsWith('https') ? shim.httpAgent_.https : shim.httpAgent_.http;
|
||||
};
|
||||
|
||||
shim.openOrCreateFile = (filepath, defaultContents) => {
|
||||
|
Loading…
Reference in New Issue
Block a user