From 5206490fef61a02f28e4f199228432a34b912ea6 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Mon, 7 Sep 2020 09:12:32 +0200 Subject: [PATCH] Change log message if session was resumed. --- src/signaling/mcu_proxy.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/signaling/mcu_proxy.go b/src/signaling/mcu_proxy.go index 295cdfe..c005ab1 100644 --- a/src/signaling/mcu_proxy.go +++ b/src/signaling/mcu_proxy.go @@ -626,6 +626,7 @@ func (c *mcuProxyConnection) processMessage(msg *ProxyServerMessage) { log.Printf("Hello connection to %s failed with %+v, reconnecting", c.url, msg.Error) c.scheduleReconnect() case "hello": + resumed := c.sessionId == msg.Hello.SessionId c.sessionId = msg.Hello.SessionId country := "" if msg.Hello.Server != nil { @@ -635,7 +636,9 @@ func (c *mcuProxyConnection) processMessage(msg *ProxyServerMessage) { } } c.country.Store(country) - if country != "" { + if resumed { + log.Printf("Resumed session %s on %s", c.sessionId, c.url) + } else if country != "" { log.Printf("Received session %s from %s (in %s)", c.sessionId, c.url, country) } else { log.Printf("Received session %s from %s", c.sessionId, c.url)