QHedgeTech/cpp-elasticsearch — pull request #1 by frodegill (2014-08-11 17:27:21+00:00)
Title: Do not fail when calling search() rapidly

As a PoC, I have made a small libwt-application where a WSuggestionPopup-model is populated server-side by a cpp-elasticsearch ElasticSearch::search(...). This means a new search is initiated for each keypress in a text edit control. By typing quite fast, cpp-elasticsearch will fail in "assert( !error() );" in HTTP::request(const char*, const char*, const char*, std::string&, const char*), because errno==EWOULDBLOCK. As I see it, this should not fail - it should just continue and try again.