mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
feat: Custom gst webrtc signaller, runtime GPU driver package install and more (#140)
🔥 🔥 Yes lots of commits because rebasing and all.. thankfully I know Git just enough to have backups 😅 --------- Co-authored-by: Wanjohi <elviswanjohi47@gmail.com> Co-authored-by: Kristian Ollikainen <DatCaptainHorse@users.noreply.github.com> Co-authored-by: Wanjohi <71614375+wanjohiryan@users.noreply.github.com> Co-authored-by: AquaWolf <3daquawolf@gmail.com>
This commit is contained in:
committed by
GitHub
parent
20d5ff511e
commit
b6196b1c69
@@ -200,11 +200,15 @@ func ingestHandler(room *Room) {
|
||||
})
|
||||
|
||||
room.WebSocket.RegisterOnClose(func() {
|
||||
// If PeerConnection is not open or does not exist, delete room
|
||||
if (room.PeerConnection != nil && room.PeerConnection.ConnectionState() != webrtc.PeerConnectionStateConnected) ||
|
||||
room.PeerConnection == nil {
|
||||
DeleteRoomIfEmpty(room)
|
||||
// If PeerConnection is still open, close it
|
||||
if room.PeerConnection != nil {
|
||||
if err = room.PeerConnection.Close(); err != nil {
|
||||
log.Printf("Failed to close PeerConnection for room: '%s' - reason: %s\n", room.Name, err)
|
||||
}
|
||||
room.PeerConnection = nil
|
||||
}
|
||||
room.Online = false
|
||||
DeleteRoomIfEmpty(room)
|
||||
})
|
||||
|
||||
log.Printf("Room: '%s' is ready, sending an OK\n", room.Name)
|
||||
|
||||
Reference in New Issue
Block a user