Skip to content

Commit

Permalink
Change log message if session was resumed.
Browse files Browse the repository at this point in the history
  • Loading branch information
fancycode committed Sep 7, 2020
1 parent 1e11eac commit 5206490
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/signaling/mcu_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
Expand Down

0 comments on commit 5206490

Please sign in to comment.