minor improvements

This commit is contained in:
seydx
2025-01-25 16:11:39 +01:00
parent f072dab07b
commit 3e3988a67f
2 changed files with 5 additions and 8 deletions
+2 -3
View File
@@ -514,7 +514,6 @@ func (c *Client) Stop() error {
if c.prod != nil {
_ = c.prod.Stop()
c.prod = nil
}
if c.ws != nil {
@@ -537,6 +536,6 @@ func (c *Client) MarshalJSON() ([]byte, error) {
if webrtcProd, ok := c.prod.(*webrtc.Conn); ok {
return webrtcProd.MarshalJSON()
}
return nil, errors.New("ring: can't marshal")
return json.Marshal(c.prod)
}