Ticket #1581: fix_kqueue.diff

File fix_kqueue.diff, 0.7 KB (added by rakshasa, 10 months ago)

Possible fix for the problem, try this.

  • libtorrent/src/torrent/poll_kqueue.cc

     
    8888void 
    8989PollKQueue::modify(Event* event, unsigned short op, short mask) { 
    9090  // Flush the changed filters to the kernel if the buffer is full. 
    91   if (m_changedEvents == m_table.size()) 
    92     flush_events(); 
    93  
    9491  if (m_changedEvents == m_maxEvents) { 
    9592    if (kevent(m_fd, m_changes, m_changedEvents, NULL, 0, NULL) == -1) 
    9693      throw internal_error("PollKQueue::modify() error: " + std::string(rak::error_number::current().c_str()));