-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
runtime: call返回的err,类型为net.(*OpError)调用时panic #776
Comments
@arch3754 你的go 版本是多少? |
当err是(*net.OpError)时,把这个err的各字段信息打印出来,看看哪里有问题,或许踩到了一个go的bug. type OpError struct {
Op string
Net string
Source Addr
Addr Addr
Err error
} |
尤其是Err字段,可以同时 |
如果你不能复现,我建议你加一层保护,如果是(*net.OpError), 直接返回 当然,如果你能复现是最好了。 复现的时候先把这个net.OpError各字段信息打印出来,看看有没有啥异常。 |
go 版本1.18.5和1.19.2都有问题,我先打出来试试,不太容易复现,好多天才能复现一次 |
smallnest
added a commit
that referenced
this issue
Jan 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如图:
![image](https://user-images.githubusercontent.com/16916249/213641722-b38648f8-6aec-4e91-8fbc-417e5fb36740.png)
部署环境是在公网,请求的目标地址也是公网
以下是对应代码块,在fmt.Sprintf("%v", err)时panic
The text was updated successfully, but these errors were encountered: