igorw/SocketServer — pull request #40 by cboden (2012-05-09 21:48:59+00:00)
Title: Possible Libevent fix

/cc @nrk

I've taken a stab at this...I've updated to libevent 0.0.5 and when running the basic HTTP test application the server does not close the connection. On libevent 0.0.4 I had a different issue where the server didn't send any data to the client.

The code introduced in this PR made both versions behave as expected. I also counted open resources and all the containers in LibEventLoop with expected counts.

I don't know anything about libevent, but it seemed that it wanted event_base_set() called on the same stream twice, once for read, once for write.

This was the error I was receiving on 0.0.4 `[warn] event_add: event has no event_base set`