Search before asking
Version
all version. because I saw that threadSpecificLogPtr in all version code.
Minimal reproduce step
May be use a static client.
What did you expect to see?
Do not have crash!
What did you see instead?
when thread exit and client destory, I called client.close() to close the connection. But, got a crash!. I saw the code and added some debug printf, finally I found that, threadSpecificLogPtr in ./lib/LogUtils.h is destoryed before client close, but thread_local ptr is not null. And then client close and may be use threadSpecificLogPtr to log, and at this time got a pointer that has been destroyed. The destroyed order of client and threadSpecificLogPtr is not correct. Hope the solution!
Anything else?
No response
Are you willing to submit a PR?
Search before asking
Version
all version. because I saw that threadSpecificLogPtr in all version code.
Minimal reproduce step
May be use a static client.
What did you expect to see?
Do not have crash!
What did you see instead?
when thread exit and client destory, I called client.close() to close the connection. But, got a crash!. I saw the code and added some debug printf, finally I found that, threadSpecificLogPtr in ./lib/LogUtils.h is destoryed before client close, but thread_local ptr is not null. And then client close and may be use threadSpecificLogPtr to log, and at this time got a pointer that has been destroyed. The destroyed order of client and threadSpecificLogPtr is not correct. Hope the solution!
Anything else?
No response
Are you willing to submit a PR?