Ticket #31: remote-comms.diff
| File remote-comms.diff, 1.5 KB (added by seth, 3 years ago) |
|---|
-
src/RemoteSerializer.cc
2689 2689 max_fd = listen_fd_ssl; 2690 2690 } 2691 2691 2692 if ( io->IsFillingUp() && ! shutting_conns_down)2692 if ( ! shutting_conns_down && io->IsFillingUp() ) 2693 2693 { 2694 2694 Error("queue to parent filling up; shutting down heaviest connection"); 2695 2695 … … 2716 2716 shutting_conns_down = true; 2717 2717 } 2718 2718 2719 if ( ! io->IsFillingUp() && shutting_conns_down)2719 if ( shutting_conns_down && ! io->IsFillingUp() ) 2720 2720 shutting_conns_down = false; 2721 2721 2722 2722 // We cannot rely solely on select() as the there may … … 2727 2727 // FIXME: Fine-tune this (timeouts, flush, etc.) 2728 2728 struct timeval small_timeout; 2729 2729 small_timeout.tv_sec = 0; 2730 small_timeout.tv_usec = io->CanWrite() ? 1 : 10;2730 small_timeout.tv_usec = io->CanWrite() ? 1000 : 10000; 2731 2731 2732 2732 if ( select(max_fd + 1, &fd_read, &fd_write, &fd_except, 2733 2733 &small_timeout) < 0 ) -
src/Net.cc
563 563 // us a lot of idle time, but doesn't delay near-term 564 564 // timers too much. (Delaying them somewhat is okay, 565 565 // since Bro timers are not high-precision anyway.) 566 if ( ! using_communication ) 567 usleep(100000); 566 usleep(100000); 568 567 569 568 // Flawfinder says about usleep: 570 569 //