Skip to content

Commit

Permalink
Fix: handle err
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed Oct 19, 2023
1 parent cf2d835 commit b4de437
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ func (s *Server) handleConn(conn *core.Conn) (err error) {
if s.authFunc == nil {
panic("rtmp server auth func not implemented")
}

channel, err := s.authFunc(app, name, connServer.IsPublisher())
if err != nil {
return err
}

if connServer.IsPublisher() {
reader := rtmp.NewReader(connServer)
Expand Down

0 comments on commit b4de437

Please sign in to comment.