Ignore:
Timestamp:
May 23, 2019 5:47:55 PM (5 years ago)
Author:
riza
Message:

Close #2201: Restart UDP transport after replace_udp_socket fail when sending data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ioqueue_common_abs.c

    r5970 r6003  
    10301030            PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 
    10311031                /* Special treatment for dead UDP sockets here, see ticket #1107 */ 
    1032                 if (status==PJ_STATUS_FROM_OS(EPIPE) && !IS_CLOSING(key) && 
    1033                     key->fd_type==pj_SOCK_DGRAM() && !restart_retry) 
     1032                if (status == PJ_STATUS_FROM_OS(EPIPE) && !IS_CLOSING(key) && 
     1033                    key->fd_type == pj_SOCK_DGRAM()) 
    10341034                { 
    1035                     PJ_PERROR(4,(THIS_FILE, status, 
    1036                                  "Send error for socket %d, retrying", 
    1037                                  key->fd)); 
    1038                     replace_udp_sock(key); 
    1039                     restart_retry = PJ_TRUE; 
    1040                     goto retry_on_restart; 
     1035                    if (!restart_retry) { 
     1036                        PJ_PERROR(4, (THIS_FILE, status, 
     1037                                      "Send error for socket %d, retrying", 
     1038                                      key->fd)); 
     1039                        replace_udp_sock(key); 
     1040                        restart_retry = PJ_TRUE; 
     1041                        goto retry_on_restart; 
     1042                    } else { 
     1043                        status = PJ_ESOCKETSTOP; 
     1044                    } 
    10411045                } 
    10421046#endif 
Note: See TracChangeset for help on using the changeset viewer.