相关疑难解决方法(0)

重启后无法在sailsjs中获取socket的会话

我试图在sailsjs上构建套接字驱动的应用程序,它很小,我只需要内存会话适配器,但是当我重新启动应用程序时,我得到了socket.get('/'):

Could not parse: No session data returned, and an error was encountered saving session data for the first time: undefined SyntaxError {stack: (...), message: "Unexpected token N"} sails.io.js:142

Uncaught Error: Server response could not be parsed!
No session data returned, and an error was encountered saving session data for the first time: undefined 
Run Code Online (Sandbox Code Playgroud)

我知道我的会话丢失了,但无法找到任何方法来恢复它,甚至无法处理此错误.

有没有办法在不重新加载页面的情况下为套接字请求新的会话cookie?

javascript socket.io sails.js

8
推荐指数
1
解决办法
6883
查看次数

标签 统计

javascript ×1

sails.js ×1

socket.io ×1