livego icon indicating copy to clipboard operation
livego copied to clipboard

API Status Stream Removing Issue

Open HorizonCode opened this issue 4 years ago • 1 comments

When starting a RTMP Stream the Stream gets added to the streams object array of the livestat API, but when stopping the stream it won't get removed, keep_hls is deactivated and the debug says "checking and removing key"

Debug Log: Debug

API (/streams) after stream stopped: streams

HorizonCode avatar Dec 21 '20 07:12 HorizonCode

Okay i did a little more debugging and it seems like func (s *Stream) CheckAlive() (n int) { in /protocol/rtmp/stream.go is returning 1 as lowest value instead of 0^

when changing the value from == 0 to <= 1 in /protocol/rtmp/stream.go:82 it works, that seems to be the issue here.

HorizonCode avatar Dec 21 '20 07:12 HorizonCode