-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
当用webman来使用GatewayWorker的时候的问题 #115
Comments
|
但是webman无法捕获到这个异常,导致后续业务无法处理 |
说明你的clientId 是无效的,那你应该传递有效的clientId,这样就不会提示了。 |
我们有个接口需要判断client_id是否有效,因为是开放的接口,用户传任何client_id都有可能。算了,我不去捕获失败,我去验证成功就行了,不成功就是失败 |
就算你做个异常处理你又能怎么处理呢? 这个就是客户端传参的问题,服务器这边提示“无效参数”,没什么问题吧 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1、我按照GatewayWorker的文档,在项目中安装webman/gateway-worker,但是在业务中如果想发送信息给客户端,我发现使用的是workerman/gateway-worker里面的文件,这里不太理解,这两个之间的关系
2、当我尝试检测一个失效的/无效的client_id的时候,Gateway::isOnline($client_id),这个方法,最终追溯到Context::clientIdToAddress($client_id),我发现,这里的抛异常,是echo,详见GatewayWorker\Lib\Context的第131行,这将导致webman的控制台出现大量的错误信息,并且该异常无法捕获到
The text was updated successfully, but these errors were encountered: