Open comerc opened 3 years ago
Solution by @levlam
"Receive is called after Client destroy" is always a bug of those, who uses TDLib. You should move call to client.DestroyInstance() to the thread, which calls receive, instead of testing your luck with Sleep.
You can also use new JSON interface (td_create_client_id/td_send/td_receive), which removes possibility to do this bug.
Hack of tdlib.go for DestroyInstance()
usage:
https://core.telegram.org/tdlib/docs/td__json__client_8h.html