mirror of
https://github.com/livekit/livekit.git
synced 2026-05-25 22:55:04 +00:00
fix: connection reset without any closing handshake on clientside (#2709)
This commit is contained in:
@@ -317,6 +317,8 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
defer func() {
|
||||
// when the source is terminated, this means Participant.Close had been called and RTC connection is done
|
||||
// we would terminate the signal connection as well
|
||||
closeMsg := websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")
|
||||
_ = conn.WriteControl(websocket.CloseMessage, closeMsg, time.Now().Add(time.Second))
|
||||
_ = conn.Close()
|
||||
}()
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user