Hello,
I have strange behaviour with 2.0.21 and I've stucked in code since 1 day about this.
I'm a linux user.
I'm using evhttp_* functions. I do evhttp_connection_base_new() at the start of the program and use the connection to send all futher messages.
Each 10 seconds I send a message throught evhttp_make_request() function.
While I don't unplug my network ethernet cable, all things are good. But if I do this, my callback for the evhttp_make_request give me a NULL "struct evhttp_request" and I don't see any futher try. Even if I replug my ethernet cable. The http thing seems to be stuck.
I tried to schedule reopen the evhttp_connection with evhttp_connection_base_new() after reveiving a NULL evhttp_request but I've got a SEGFAULT.
I'm lost. What can I do ?
For information, my system reset the ip address of my network interface when I unplug the ethernet cable.
I found the problem !
I use ifplugd. On down event, my script did a "/sbin/ifconfig eth0 0.0.0.0". If I comment this line, libevent doesn't make a SEGFAULT or something hazardious.
I think you can reproduce the problem with a program which evhttp_connection_base_new() and use the same connection again and again. After, If you unplug the cable, you should see the problem.
Maybe libevent could be resilience about this case, couldn't it ?
Regards,
Anthony Viallard