mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
client: Send "bye" before closing connection.
This commit is contained in:
parent
aee0e6d866
commit
87345118d8
1 changed files with 4 additions and 0 deletions
|
|
@ -134,6 +134,10 @@ func (c *SignalingClient) Close() {
|
|||
c.lock.Lock()
|
||||
c.publicSessionId = ""
|
||||
c.privateSessionId = ""
|
||||
c.writeInternal(&signaling.ClientMessage{
|
||||
Type: "bye",
|
||||
Bye: &signaling.ByeClientMessage{},
|
||||
})
|
||||
c.conn.SetWriteDeadline(time.Now().Add(writeWait)) // nolint
|
||||
c.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) // nolint
|
||||
c.conn.Close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue