mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-08 08:52:27 +02:00
Handle "bye" proxy messages.
This commit is contained in:
parent
b6a0597fb7
commit
73903315a9
|
@ -661,6 +661,8 @@ func (c *mcuProxyConnection) processMessage(msg *ProxyServerMessage) {
|
||||||
c.processPayload(msg)
|
c.processPayload(msg)
|
||||||
case "event":
|
case "event":
|
||||||
c.processEvent(msg)
|
c.processEvent(msg)
|
||||||
|
case "bye":
|
||||||
|
c.processBye(msg)
|
||||||
default:
|
default:
|
||||||
log.Printf("Unsupported message received from %s: %+v", c.url, msg)
|
log.Printf("Unsupported message received from %s: %+v", c.url, msg)
|
||||||
}
|
}
|
||||||
|
@ -734,6 +736,17 @@ func (c *mcuProxyConnection) processEvent(msg *ProxyServerMessage) {
|
||||||
log.Printf("Received event for unknown client %+v from %s", event, c.url)
|
log.Printf("Received event for unknown client %+v from %s", event, c.url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *mcuProxyConnection) processBye(msg *ProxyServerMessage) {
|
||||||
|
bye := msg.Bye
|
||||||
|
switch bye.Reason {
|
||||||
|
case "session_resumed":
|
||||||
|
log.Printf("Session %s on %s was resumed by other client, resetting", c.sessionId, c.url)
|
||||||
|
c.sessionId = ""
|
||||||
|
default:
|
||||||
|
log.Printf("Received bye with unsupported reason from %s %+v", c.url, bye)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (c *mcuProxyConnection) sendHello() error {
|
func (c *mcuProxyConnection) sendHello() error {
|
||||||
c.helloMsgId = strconv.FormatInt(atomic.AddInt64(&c.msgId, 1), 10)
|
c.helloMsgId = strconv.FormatInt(atomic.AddInt64(&c.msgId, 1), 10)
|
||||||
msg := &ProxyClientMessage{
|
msg := &ProxyClientMessage{
|
||||||
|
|
Loading…
Reference in a new issue