Skip to content

Commit a70d53f

Browse files
authored
Merge pull request #64 from markniebur/fix/double-close
fix calling srt_close on the same descriptor twice
2 parents 5ecc7b5 + 138d5df commit a70d53f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

srtgo.go

+1
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ func (s *SrtSocket) SetWriteDeadline(deadline time.Time) {
279279
func (s *SrtSocket) Close() {
280280

281281
C.srt_close(s.socket)
282+
s.socket = SRT_INVALID_SOCK
282283
if !s.blocking {
283284
s.pd.close()
284285
}

0 commit comments

Comments
 (0)