Phase 3.5: Finalized UI polish, added Console, and fixed stale stream status bug
This commit is contained in:
@@ -72,8 +72,8 @@ func NewRTMPServer() *RTMPServer {
|
||||
s.channels[roomLivePath] = q
|
||||
s.mutex.Unlock()
|
||||
|
||||
// Mark room as active in DB
|
||||
db.DB.Model(&room).Update("is_active", true)
|
||||
// Mark room as active in DB (using map to ensure true/false is correctly updated)
|
||||
db.DB.Model(&room).Updates(map[string]interface{}{"is_active": true})
|
||||
|
||||
// 3. Cleanup on end
|
||||
defer func() {
|
||||
@@ -81,7 +81,8 @@ func NewRTMPServer() *RTMPServer {
|
||||
delete(s.channels, roomLivePath)
|
||||
s.mutex.Unlock()
|
||||
q.Close()
|
||||
db.DB.Model(&room).Update("is_active", false) // Mark room as inactive
|
||||
// Explicitly set is_active to false using map
|
||||
db.DB.Model(&room).Updates(map[string]interface{}{"is_active": false})
|
||||
fmt.Printf("[INFO] Publishing ended for Room ID: %d\n", room.ID)
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user