Don't poll the connection monitor if there are no connections added.
This caused the backends to return an error code, which in turn ended the mainloop. However, several other things also might occur in the main loop, such as DNS lookups which come prior to creating any connections that in turn would be monitored.
这个提交包含在:
+3
-2
@@ -132,10 +132,11 @@ struct timeout_queue* net_backend_get_timeout_queue()
|
||||
*/
|
||||
int net_backend_process()
|
||||
{
|
||||
int res;
|
||||
int res = 0;
|
||||
size_t secs = timeout_queue_get_next_timeout(&g_backend->timeout_queue, g_backend->now);
|
||||
|
||||
res = g_backend->handler.backend_poll(g_backend->data, secs * 1000);
|
||||
if (g_backend->common.num)
|
||||
res = g_backend->handler.backend_poll(g_backend->data, secs * 1000);
|
||||
|
||||
g_backend->now = time(0);
|
||||
timeout_queue_process(&g_backend->timeout_queue, g_backend->now);
|
||||
|
||||
在新工单中引用
屏蔽一个用户