smartnode/telebot

Possible deadlock in telebot-core.telebot_core_curl_perform()

Closed this issue · 3 comments

The method sets core_h->busy = true, but never sets it back to false on error.
-> Next time program will halt indefinitely.

Indeed, there is a bug that may cause deadlock. Following patch fixes it.
e4adb71

I am new to this kind of thing but why can we use just a normal variable as a lock?
I thought a mutex or an atomic operation has to be used in such cases.

I was using simpler alternative to mutex, and remove necessity for locking, and/or busy waiting.