mirror of https://github.com/aria2/aria2
				
				
				
			Log error when event polling function failed.
							parent
							
								
									e95b8efc6b
								
							
						
					
					
						commit
						87ca37ea48
					
				| 
						 | 
				
			
			@ -123,8 +123,11 @@ void EpollEventPoll::poll(const struct timeval& tv)
 | 
			
		|||
      KSocketEntry* p = reinterpret_cast<KSocketEntry*>(epEvents_[i].data.ptr);
 | 
			
		||||
      p->processEvents(epEvents_[i].events);
 | 
			
		||||
    }
 | 
			
		||||
  } else if(res == -1) {
 | 
			
		||||
    int errNum = errno;
 | 
			
		||||
    A2_LOG_INFO(fmt("epoll_wait error: %s",
 | 
			
		||||
                    util::safeStrerror(errNum).c_str()));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_ASYNC_DNS
 | 
			
		||||
  // It turns out that we have to call ares_process_fd before ares's
 | 
			
		||||
  // own timeout and ares may create new sockets or closes socket in
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -133,8 +133,10 @@ void KqueueEventPoll::poll(const struct timeval& tv)
 | 
			
		|||
      }
 | 
			
		||||
      p->processEvents(events);
 | 
			
		||||
    }
 | 
			
		||||
  } else if(res == -1) {
 | 
			
		||||
    int errNum = errno;
 | 
			
		||||
    A2_LOG_INFO(fmt("kevent error: %s", util::safeStrerror(errNum).c_str()));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_ASYNC_DNS
 | 
			
		||||
  // It turns out that we have to call ares_process_fd before ares's
 | 
			
		||||
  // own timeout and ares may create new sockets or closes socket in
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -111,6 +111,9 @@ void PollEventPoll::poll(const struct timeval& tv)
 | 
			
		|||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  } else if(res == -1) {
 | 
			
		||||
    int errNum = errno;
 | 
			
		||||
    A2_LOG_INFO(fmt("poll error: %s", util::safeStrerror(errNum).c_str()));
 | 
			
		||||
  }
 | 
			
		||||
#ifdef ENABLE_ASYNC_DNS
 | 
			
		||||
  // It turns out that we have to call ares_process_fd before ares's
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -131,6 +131,9 @@ void PortEventPoll::poll(const struct timeval& tv)
 | 
			
		|||
                         util::safeStrerror(errNum).c_str()));
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  } else if(res == -1) {
 | 
			
		||||
    int errNum = errno;
 | 
			
		||||
    A2_LOG_INFO(fmt("port_getn error: %s", util::safeStrerror(errNum).c_str()));
 | 
			
		||||
  }
 | 
			
		||||
#ifdef ENABLE_ASYNC_DNS
 | 
			
		||||
  // It turns out that we have to call ares_process_fd before ares's
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -213,6 +213,9 @@ void SelectEventPoll::poll(const struct timeval& tv)
 | 
			
		|||
      }
 | 
			
		||||
      (*i)->processEvents(events);
 | 
			
		||||
    }
 | 
			
		||||
  } else if(res == -1) {
 | 
			
		||||
    int errNum = errno;
 | 
			
		||||
    A2_LOG_INFO(fmt("select error: %s", util::safeStrerror(errNum).c_str()));
 | 
			
		||||
  }
 | 
			
		||||
#ifdef ENABLE_ASYNC_DNS
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue