1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

avoid panics

This commit is contained in:
Hossein Mehrabi 2018-06-04 06:29:58 +04:30 committed by Chris Cummer
parent f619a904fa
commit 0ffeab9c8d

View File

@ -127,6 +127,11 @@ func (widget *Widget) Refresh() {
/* -------------------- Unexported Functions -------------------- */ /* -------------------- Unexported Functions -------------------- */
func (widget *Widget) updateSummary() { func (widget *Widget) updateSummary() {
// In case if anything bad happened!
defer func() {
recover()
}()
client := &http.Client{ client := &http.Client{
Timeout: time.Duration(5 * time.Second), Timeout: time.Duration(5 * time.Second),
} }