mirror of
https://github.com/lkmio/gb-cms.git
synced 2025-09-26 19:51:22 +08:00
fix: invite无应答发生crash问题
This commit is contained in:
3
live.go
3
live.go
@@ -157,6 +157,9 @@ func (d *Device) Invite(inviteType InviteType, streamId StreamID, channelId, sta
|
||||
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
} else if dialogRequest == nil {
|
||||
// invite 没有收到任何应答
|
||||
return nil, nil, fmt.Errorf("invite request timeout")
|
||||
} else if "active" == setup {
|
||||
// 如果是TCP主动拉流, 还需要将拉流地址告知给流媒体服务
|
||||
var answer *sdp.SDP
|
||||
|
@@ -72,10 +72,9 @@ func (s *streamManager) Remove(id StreamID) *Stream {
|
||||
if ok && stream.Dialog != nil {
|
||||
callID, _ := stream.Dialog.CallID()
|
||||
delete(s.callIds, callID.Value())
|
||||
return stream
|
||||
}
|
||||
|
||||
return nil
|
||||
return stream
|
||||
}
|
||||
|
||||
func (s *streamManager) RemoveWithCallId(id string) *Stream {
|
||||
|
Reference in New Issue
Block a user