Skip to content

Commit

Permalink
rtmp source: allow outgoing acknowledges
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Aug 16, 2022
1 parent 7216fc6 commit 85ce121
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/core/rtmp_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ func (c *rtmpConn) runPublish(ctx context.Context, u *url.URL) error {
c.path.Name(),
sourceTrackInfo(tracks))

// disable write deadline
// disable write deadline to allow outgoing acknowledges
c.nconn.SetWriteDeadline(time.Time{})

for {
Expand Down
3 changes: 3 additions & 0 deletions internal/core/rtmp_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ func (s *rtmpSource) run(ctx context.Context) error {
s.parent.sourceStaticImplSetNotReady(pathSourceStaticSetNotReadyReq{})
}()

// disable write deadline to allow outgoing acknowledges
nconn.SetWriteDeadline(time.Time{})

for {
nconn.SetReadDeadline(time.Now().Add(time.Duration(s.readTimeout)))
msg, err := conn.ReadMessage()
Expand Down

0 comments on commit 85ce121

Please sign in to comment.