From 0ffeab9c8d9ec8ba25b59c3480feccd4bc6b6dec Mon Sep 17 00:00:00 2001 From: Hossein Mehrabi Date: Mon, 4 Jun 2018 06:29:58 +0430 Subject: [PATCH] avoid panics --- cryptoexchanges/bittrex/widget.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cryptoexchanges/bittrex/widget.go b/cryptoexchanges/bittrex/widget.go index 9f5039dd..dc85f3e2 100644 --- a/cryptoexchanges/bittrex/widget.go +++ b/cryptoexchanges/bittrex/widget.go @@ -127,6 +127,11 @@ func (widget *Widget) Refresh() { /* -------------------- Unexported Functions -------------------- */ func (widget *Widget) updateSummary() { + // In case if anything bad happened! + defer func() { + recover() + }() + client := &http.Client{ Timeout: time.Duration(5 * time.Second), }