Open gzncland opened 3 months ago
另外还发现一个问题是SipRequestForResponse
会阻塞很久,或者会报超时错误。估计是gosip库的问题
嗯,你看看有没有办法回收端口,帮忙提个 PR
在发送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 }
请问解决了吗
解决了
https://github.com/Monibuca/plugin-gb28181/blob/a207352fe6e4a2fc67780ce71ac48f56f9e17b3f/channel.go#L425
在发送Invite请求之前需要从
PortManager
中拿一个端口,但是发送Invite请求不成功时,不能走Bye
中的recycle
逻辑。久而久之PortManager.Range()
会越来越少直至耗尽