Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pinus 服务端的 session 调用偶尔会丢 uid 的值咋回事,大家遇到过吗? #938

Open
zoujiaqing opened this issue Aug 13, 2024 · 4 comments

Comments

@zoujiaqing
Copy link

从日志中可以看出我第一次打印 session.remoteAddress.ip 和 session.uid 都是成功的,后面请求的时候 session.uid 丢了,可能是啥原因呢?

[2024-08-14T01:49:14.509] [INFO] logger - 5: [gate-server-1 console] uid >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Wed Aug 14 2024 01:49:14 GMT+0800 (CST)
[2024-08-14T01:49:14.510] [INFO] logger - 44: [gate-server-1 console] ip: 47.116.98.172 , port: 3050
[2024-08-14T01:49:15.576] [INFO] logger - 18: [connector-server-1 console] session.remoteAddress.ip .................................... >>>
[2024-08-14T01:49:15.577] [INFO] logger - 20: [connector-server-1 console] "::ffff:113.249.234.12"
[2024-08-14T01:49:15.578] [INFO] logger - 5: [connector-server-1 console] uid >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 24
[2024-08-14T01:49:15.595] [INFO] logger - 74: [hall-server-1 console] connected
[2024-08-14T01:49:15.820] [INFO] logger - 18: [connector-server-1 console] session.remoteAddress.ip .................................... >>>
[2024-08-14T01:49:15.821] [INFO] logger - 20: [connector-server-1 console] "::ffff:113.249.234.12"
[2024-08-14T01:49:15.822] [INFO] logger - 5: [connector-server-1 console] uid >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> null
@zoujiaqing
Copy link
Author

不排除是客户端问题,因为 ios 请求没问题,android 有问题,但是 ts 代码都是一模一样。

代码如下:

        var route = 'hall.hallHandler.enter';
        var res: IResponse = await vv.pinus.request(route, {});

@whtiehack
Copy link
Member

你把sessionId也打印出来.看是不是 sessionid变了

@zoujiaqing
Copy link
Author

这个错误后来没解决,但是客户端代码是一套,不知道咱们这个 cocoscreator 可以整合 pinus 的最新 TS 代码和实例有没有呢?

@whtiehack
Copy link
Member

就js代码就行 了 我也没有ts的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants