summaryrefslogtreecommitdiff
path: root/sh/news
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-05-31 16:25:38 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-05-31 16:25:38 -0700
commitc37dd02f572f289037cbfbae3024b6b7fd73b848 (patch)
tree925091e518e3ead25123903dbd2c801674cec144 /sh/news
parentf46002ae7b7952b30bb1eb303e49fddd84be7757 (diff)
fix: dynotify: check curl retuen so when failed it will not crash
Before when no internet, curl error "curl_easy_perform() failed: Couldn't resolve host name" will cause `json_tokener_parse(chunk.response)` to crash the program with error "Segmentation fault (core dumped)". I guess maybe because chunk.response is NULL because curl error not assign value to it. Now I check return error code of curl to break the loop and wait a minute to see if error gone and proceed forward. Maybe also check chunk.response and json function error code somehow.
Diffstat (limited to 'sh/news')
0 files changed, 0 insertions, 0 deletions