mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 09:18:38 +00:00
fix(discord): harden reconnect recovery and preserve message delivery
Landed from contributor PR #29508 by @cgdusek. Co-authored-by: Charles Dusek <cgdusek@gmail.com>
This commit is contained in:
@@ -84,12 +84,14 @@ describe("createFeishuWSClient proxy handling", () => {
|
||||
|
||||
createFeishuWSClient(baseAccount);
|
||||
|
||||
const expectedHttpsProxy = process.env.https_proxy || process.env.HTTPS_PROXY;
|
||||
// On Windows env keys are case-insensitive, so setting HTTPS_PROXY may
|
||||
// overwrite https_proxy. We assert https proxies still win over http.
|
||||
const expectedProxy = process.env.https_proxy || process.env.HTTPS_PROXY;
|
||||
expect(expectedProxy).toBeTruthy();
|
||||
expect(httpsProxyAgentCtorMock).toHaveBeenCalledTimes(1);
|
||||
expect(expectedHttpsProxy).toBeTruthy();
|
||||
expect(httpsProxyAgentCtorMock).toHaveBeenCalledWith(expectedHttpsProxy);
|
||||
expect(httpsProxyAgentCtorMock).toHaveBeenCalledWith(expectedProxy);
|
||||
const options = firstWsClientOptions();
|
||||
expect(options.agent).toEqual({ proxyUrl: expectedHttpsProxy });
|
||||
expect(options.agent).toEqual({ proxyUrl: expectedProxy });
|
||||
});
|
||||
|
||||
it("passes HTTP_PROXY to ws client when https vars are unset", () => {
|
||||
|
||||
Reference in New Issue
Block a user