libasyncd
libasyncd copied to clipboard
How to close a connection in a seperate thread
Hello,
I'm using this library in a multithreaded environment. When a new request arrives I add a new thread in a Thread pool. I managed to write from here using evbuffer_add
.
I managed to do something by setting userdata. and at every event I check the content to know if I should return AD_CLOSE.
Is there a better way to do this ?
Thanks a lot
Actually what I did only works for the first request. I get a SEGSEV on the second request. I'm a little lost
Hi,
returning AD_CLOSE is the right way to do it. About SEGSEV, I have no clue where it happens unless I see the code but core dump might help you to identify the issue.