@rpcbase/server 0.554.0 → 0.556.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { createClient } from "redis";
5
5
  import { MongoClient } from "mongodb";
6
6
  import env from "@rpcbase/env";
7
7
  import { initApiClient, STATIC_RPCBASE_RTS_HYDRATION_DATA_KEY, RtsSsrRuntimeProvider, SsrErrorFallback, SSR_ERROR_STATE_GLOBAL_KEY, serializeSsrErrorState } from "@rpcbase/client";
8
- import { getMongoUrl } from "@rpcbase/db/mongo";
8
+ import { getMongoDirectConnection, getMongoUrl } from "@rpcbase/db/mongo";
9
9
  import { posix, dirname, sep, isAbsolute, relative } from "path";
10
10
  import fs, { createReadStream, readFileSync } from "node:fs";
11
11
  import { createInterface } from "node:readline";
@@ -4254,7 +4254,8 @@ const createMongoSessionStore = async (serverEnv) => {
4254
4254
  const client2 = await MongoClient.connect(mongoUrl, {
4255
4255
  family: 4,
4256
4256
  serverSelectionTimeoutMS: 2e3,
4257
- connectTimeoutMS: 2e3
4257
+ connectTimeoutMS: 2e3,
4258
+ directConnection: getMongoDirectConnection(serverEnv)
4258
4259
  });
4259
4260
  const store = MongoStore.create({
4260
4261
  client: client2,