Changeset 1503 for pjproject/trunk
- Timestamp:
- Oct 16, 2007 2:10:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r1498 r1503 26 26 #include <pj/rand.h> 27 27 #include <pj/string.h> 28 #include <pj/compat/socket.h> 28 29 29 30 … … 441 442 pj_ice_strans *ice_st = comp->ice_st; 442 443 pj_ssize_t pkt_size; 443 enum { RETRY = 4};444 enum { RETRY = 10 }; 444 445 unsigned retry; 445 446 pj_status_t status; … … 516 517 517 518 /* Read next packet */ 518 for (retry=0; retry<RETRY; ++retry) {519 for (retry=0; retry<RETRY;) { 519 520 pkt_size = sizeof(comp->pkt); 520 521 comp->src_addr_len = sizeof(comp->src_addr); … … 522 523 PJ_IOQUEUE_ALWAYS_ASYNC, 523 524 &comp->src_addr, &comp->src_addr_len); 524 if (status != PJ_SUCCESS && status != PJ_EPENDING) { 525 if (status == PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) || 526 status == PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) || 527 status == PJ_STATUS_FROM_OS(OSERR_ECONNRESET)) 528 { 529 ice_st_perror(comp->ice_st, "ioqueue recvfrom() error", status); 530 ++retry; 531 continue; 532 } else if (status != PJ_SUCCESS && status != PJ_EPENDING) { 533 retry += 2; 525 534 ice_st_perror(comp->ice_st, "ioqueue recvfrom() error", status); 526 535 } else {
Note: See TracChangeset
for help on using the changeset viewer.