Pass disableIPv6
setting to libsignal-net
This commit is contained in:
parent
793346031b
commit
ae4fa04e95
3 changed files with 4 additions and 2 deletions
|
@ -640,6 +640,7 @@ type InitializeOptionsType = {
|
|||
version: string;
|
||||
directoryConfig: DirectoryConfigType;
|
||||
libsignalNetEnvironment: string | undefined;
|
||||
disableIPv6: boolean;
|
||||
};
|
||||
|
||||
export type MessageType = Readonly<{
|
||||
|
@ -1459,6 +1460,7 @@ export function initialize({
|
|||
proxyUrl,
|
||||
version,
|
||||
libsignalNetEnvironment,
|
||||
disableIPv6,
|
||||
}: InitializeOptionsType): WebAPIConnectType {
|
||||
if (!isString(url)) {
|
||||
throw new Error('WebAPI.initialize: Invalid server url');
|
||||
|
@ -1510,6 +1512,7 @@ export function initialize({
|
|||
);
|
||||
log.info(`libsignal net environment resolved to [${Net.Environment[env]}]`);
|
||||
const libsignalNet = new Net.Net(env);
|
||||
libsignalNet.setIpv6Enabled(!disableIPv6);
|
||||
|
||||
// Thanks to function-hoisting, we can put this return statement before all of the
|
||||
// below function definitions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue