diff --git a/src/configurations/build.ts b/src/configurations/build.ts index 7a7a49279f5f13e850176d3fb3da54308a8bbce5..400f1eeeddfa0c9233b4f3494299f2b0ede6f007 100644 --- a/src/configurations/build.ts +++ b/src/configurations/build.ts @@ -231,7 +231,7 @@ const buildConnect: BuildConnectionFn = const bufferOptions = { fromId, toId }; const useSession = - !options.useWithoutSession || typeof options.sessionId === "number"; + options.useSession || typeof options.sessionId === "number"; let sessionOptions: USPSession = makeSession(options.sessionId || null); let encode = makeEncode(proto, bufferOptions, useSession); const sessionReqs = { diff --git a/src/types.ts b/src/types.ts index 699fc8655762942447b8ee35401601e30ca6977d..ed875bdbde44832a7bbca6c2e861637dc018582b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -702,7 +702,7 @@ export interface MainConnectionOptions { ca?: CertType | Object[]; key?: CertType; cert?: CertType; - useWithoutSession?: boolean; + useSession?: boolean; sessionId?: number; /** * Close connection if disconnected