- Timestamp:
- Sep 22, 2010 1:11:11 PM (14 years ago)
- Location:
- pjproject/trunk/pjlib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/config.h
r3182 r3316 505 505 #ifndef PJ_MAX_HOSTNAME 506 506 # define PJ_MAX_HOSTNAME (128) 507 #endif 508 509 /** 510 * Maximum consecutive identical error for accept() operation before 511 * activesock stops calling the next ioqueue accept. 512 * 513 * Default: 50 514 */ 515 #ifndef PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR 516 # define PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR 50 507 517 #endif 508 518 -
pjproject/trunk/pjlib/src/pj/activesock.c
r3299 r3316 85 85 #endif 86 86 87 unsigned err_counter; 88 pj_status_t last_err; 89 87 90 struct send_data send_data; 88 91 … … 791 794 792 795 do { 796 if (status == asock->last_err && status != PJ_SUCCESS) { 797 asock->err_counter++; 798 if (asock->err_counter >= PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR) { 799 PJ_LOG(3, ("", "Received %d consecutive errors: %d for the accept()" 800 " operation, stopping further ioqueue accepts.", 801 asock->err_counter, asock->last_err)); 802 return; 803 } 804 } else { 805 asock->err_counter = 0; 806 asock->last_err = status; 807 } 808 793 809 if (status==PJ_SUCCESS && asock->cb.on_accept_complete) { 794 810 pj_bool_t ret;
Note: See TracChangeset
for help on using the changeset viewer.