Skip to content

Commit

Permalink
fix: not working timout for RTMP server session
Browse files Browse the repository at this point in the history
  • Loading branch information
jaesung9507 committed Jun 9, 2023
1 parent 9d8a9b8 commit bfd22ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rtmp/server_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@ func (s *ServerSession) doPublish(tid int, stream *Stream) (err error) {
if err = s.packer.writeOnStatusPublish(s.conn, Msid1); err != nil {
return err
}
s.sessionStat.SetBaseType(base.SessionBaseTypePubStr)

// 回复完信令后修改 connection 的属性
s.modConnProps()

s.sessionStat.SetBaseType(base.SessionBaseTypePubStr)
err = s.observer.OnNewRtmpPubSession(s)
if err != nil {
s.DisposeByObserverFlag = true
Expand Down Expand Up @@ -520,11 +520,11 @@ func (s *ServerSession) doPlay(tid int, stream *Stream) (err error) {
if err := s.packer.writeOnStatusPlay(s.conn, Msid1); err != nil {
return err
}
s.sessionStat.SetBaseType(base.SessionBaseTypeSubStr)

// 回复完信令后修改 connection 的属性
s.modConnProps()

s.sessionStat.SetBaseType(base.SessionBaseTypeSubStr)
err = s.observer.OnNewRtmpSubSession(s)
if err != nil {
s.DisposeByObserverFlag = true
Expand Down

0 comments on commit bfd22ca

Please sign in to comment.