- if (poll(fds, 1, ptr->poll_timeout) < 0)
- return MEMCACHED_FAILURE;
+ error= poll(fds, 1, ptr->poll_timeout);
+
+ if (error == 1)
+ return MEMCACHED_SUCCESS;
+ else if (error == 0)
+ {
+ return MEMCACHED_TIMEOUT;
+ }
+
+ WATCHPOINT;
+ /* Imposssible for anything other then -1 */
+ WATCHPOINT_ASSERT(error == -1);
+ memcached_quit_server(ptr, server_key, 1);
+ return MEMCACHED_FAILURE;