Improve connection error handling

This commit is contained in:
Tulir Asokan
2019-05-15 23:04:09 +03:00
parent 69879df346
commit 6b73c66e12
7 changed files with 188 additions and 17 deletions

View File

@ -919,7 +919,7 @@ func (portal *Portal) HandleMatrixMessage(sender *User, evt *mautrix.Event) {
}
portal.markHandled(sender, info, evt.ID)
portal.log.Debugln("Sending event", evt.ID, "to WhatsApp")
err = sender.Conn.Send(info)
_, err = sender.Conn.Send(info)
if err != nil {
portal.log.Errorfln("Error handling Matrix event %s: %v", evt.ID, err)
} else {