Comment 1 for bug 583031

Revision history for this message
Egor Egorov (me-egorfine) wrote :

It turns out this is not the best way to fix the problem. What I had to do is to set no_block to true, bring back the above two lines, but add the following in connect.c:

...
            int error= poll(fds, 1, timeout);

            switch (error)
            {
...
            case 0:
                if (loop_max==1) {
                    return MEMCACHED_TIMEOUT;
                }
              continue;
              // A real error occurred and we need to completely bail
...