NetEase/libpomelo — pull request #18 by eminom (2013-05-03 09:39:46+00:00)
Title: Clean-up of 'client' should be done in main thread. 

I found an issue, described as follows:

As the worker thread quits, it marks the client state as 'PC_ST_CLOSED'. Then it iterates thru the listener list to broadcast its demise, while pc_client_destroy (in the main thread) cleans up the 'listeners', which leads to memory corruption.