mirror of https://github.com/jetkvm/kvm.git
fix: Handle error when writing device metadata to WebRTC signaling channel
This commit is contained in:
parent
443cf5d029
commit
fd6bf90735
6
web.go
6
web.go
|
@ -145,7 +145,11 @@ func handleLocalWebRTCSignal(c *gin.Context) {
|
|||
// Now use conn for websocket operations
|
||||
defer wsCon.Close(websocket.StatusNormalClosure, "")
|
||||
|
||||
wsjson.Write(context.Background(), wsCon, gin.H{"type": "device-metadata", "data": gin.H{"deviceVersion": builtAppVersion}})
|
||||
err = wsjson.Write(context.Background(), wsCon, gin.H{"type": "device-metadata", "data": gin.H{"deviceVersion": builtAppVersion}})
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
err = handleWebRTCSignalWsMessages(wsCon, false, source)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue