reconnect

This commit is contained in:
云风
2012-08-15 11:42:32 +08:00
parent ed7e0da860
commit e7539a07b6
5 changed files with 99 additions and 63 deletions

View File

@@ -68,7 +68,7 @@ _read_queue(struct connection_pool * pool, int timeout) {
void *
connection_poll(struct connection_pool * pool, int timeout) {
if (pool->queue_head >= pool->queue_len) {
if (_read_queue(pool, timeout) == -1) {
if (_read_queue(pool, timeout) <= 0) {
return NULL;
}
}