fixed panic when client connected abruptly

This commit is contained in:
David Zhao
2021-01-26 17:38:47 -08:00
parent b96028b4d6
commit a065a01592
10 changed files with 54 additions and 10 deletions
+2
View File
@@ -335,6 +335,8 @@ func (c *RTCClient) ResumeLogs() {
}
func (c *RTCClient) SendRequest(msg *livekit.SignalRequest) error {
c.lock.Lock()
defer c.lock.Unlock()
payload, err := protojson.Marshal(msg)
if err != nil {
return err