mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-17 21:16:33 +02:00
Close message channel before closing client.
Otherwise the call to "Close" might wait forever for the message processing goroutine to finish.
This commit is contained in:
parent
6395b87577
commit
b7f221705a
|
@ -254,8 +254,8 @@ func (c *Client) SendMessage(message WritableClientMessage) bool {
|
||||||
|
|
||||||
func (c *Client) ReadPump() {
|
func (c *Client) ReadPump() {
|
||||||
defer func() {
|
defer func() {
|
||||||
c.Close()
|
|
||||||
close(c.messageChan)
|
close(c.messageChan)
|
||||||
|
c.Close()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
addr := c.RemoteAddr()
|
addr := c.RemoteAddr()
|
||||||
|
|
Loading…
Reference in a new issue