api: fix crash when retrieving RTMP and SRT connections (#2430)

Co-authored-by: Paxx <daniel.botta@hiway.media>
This commit is contained in:
Paxx
2023-09-28 17:45:34 +02:00
committed by GitHub
parent 42aa979309
commit 72e74b6456
2 changed files with 2 additions and 2 deletions

View File

@@ -644,7 +644,7 @@ func (c *rtmpConn) apiItem() *apiRTMPConn {
bytesReceived := uint64(0)
bytesSent := uint64(0)
if c.conn != nil {
if c.rconn != nil {
bytesReceived = c.rconn.BytesReceived()
bytesSent = c.rconn.BytesSent()
}