Handle case where error passed to HandleError is nil

master
Hugo Thunnissen 4 years ago
parent dd71517979
commit ee5a86c402

@ -13,6 +13,11 @@ type WhappHandler struct {
}
func (h *WhappHandler) HandleError(err error) {
// Apparently, the error passed to this function can sometimes be nil.
if err == nil {
return
}
if _, connectionFailed := err.(*whatsapp.ErrConnectionFailed); connectionFailed {
err = RestoreWhappSessionFromStorage(
h.BridgeContext.Config.App.DataFolder,

Loading…
Cancel
Save