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

Invite请求中SipRequestForResponse报错之后,使用的端口没有回收 #109

Open
gzncland opened this issue Jun 14, 2024 · 4 comments

Comments

@gzncland
Copy link

return http.StatusInternalServerError, err

在发送Invite请求之前需要从PortManager中拿一个端口,但是发送Invite请求不成功时,不能走Bye中的recycle逻辑。久而久之PortManager.Range()会越来越少直至耗尽

inviteRes, err := d.SipRequestForResponse(invite)
if err != nil {
  channel.Error("invite", zap.Error(err), zap.String("msg", invite.String()))
  return http.StatusInternalServerError, err
}
@gzncland
Copy link
Author

另外还发现一个问题是SipRequestForResponse会阻塞很久,或者会报超时错误。估计是gosip库的问题

@langhuihui
Copy link
Member

嗯,你看看有没有办法回收端口,帮忙提个 PR

@YOLO-PK
Copy link

YOLO-PK commented Aug 8, 2024

return http.StatusInternalServerError, err

在发送Invite请求之前需要从PortManager中拿一个端口,但是发送Invite请求不成功时,不能走Bye中的recycle逻辑。久而久之PortManager.Range()会越来越少直至耗尽

inviteRes, err := d.SipRequestForResponse(invite)
if err != nil {
  channel.Error("invite", zap.Error(err), zap.String("msg", invite.String()))
  return http.StatusInternalServerError, err
}

请问解决了吗

@langhuihui
Copy link
Member

解决了

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

3 participants