Replies: 1 comment 3 replies
-
Same issue idk if is related to nextjs void app.prepare().then(() => {
const server = http.createServer((req, res) => {
const parsedUrl = parse(req.url!, true);
handle(req, res, parsedUrl);
});
const wss = new ws.Server({ port: 3001 });
// @ts-ignore
const handler = applyWSSHandler({
wss,
router: appRouter,
createContext: async (opts) => {
const { req, res } = opts;
//error
const session = await getServerSession(req, res);
},
}); but if i remove the context is working, but the thing is i cannot use privateProcedures because the sessions is not passing on subscriptions, only on queries and mutations const wss = new ws.Server({ port: 3001 });
// @ts-ignore
const handler = applyWSSHandler({
wss,
router: appRouter,
}); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I have a simple config in createConfig and wsServer.
It causes an issue (infinite open/close) Websocket connection. When I remove getServerAuthSession it works)
Beta Was this translation helpful? Give feedback.
All reactions