]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10150: [freeswitch-core] Reduce writes to closed ssl sockets -- same fix for non...
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 21 Apr 2017 20:43:40 +0000 (15:43 -0500)
committerMike Jerris <mike@jerris.com>
Thu, 1 Jun 2017 18:46:44 +0000 (14:46 -0400)
libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/tport/ws.c
src/mod/endpoints/mod_verto/ws.c

index 49ea97e5711e7777c07d6677c9922e77e6004524..480587cae39a856c96fc7deec827695307a18809 100644 (file)
@@ -1 +1 @@
-Thu Apr  6 17:08:19 CDT 2017
+Thu Jun  1 14:43:20 EDT 2017
index d7dde7cec02b9a21e6c2313f6b52bba52aef40ae..4082038367b9979fa148ce62a1a6845e033ec16b 100644 (file)
@@ -455,7 +455,13 @@ ssize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
                        ms_sleep(1);
                }
 
-       } while (--sanity > 0 && ((r == -1 && xp_is_blocking(xp_errno())) || (wsh->block && wrote < bytes)));
+               if (r == -1) {
+                       if (!xp_is_blocking(xp_errno())) {
+                               break;
+                       }
+               }
+
+       } while (--sanity > 0 && wsh->block && wrote < bytes);
 
        //if (r<0) {
                //printf("wRITE FAIL: %s\n", strerror(errno));
index 953770310caddf9bd3ee8c158e327b679689defe..b934383c3c7a67d797bfcc9c2320bf7e2e94d08b 100644 (file)
@@ -454,9 +454,15 @@ ssize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
                if (sanity < 2000) {
                        ms_sleep(1);
                }
-               
-       } while (--sanity > 0 && ((r == -1 && xp_is_blocking(xp_errno())) || (wsh->block && wrote < bytes)));
-       
+
+               if (r == -1) {
+                       if (!xp_is_blocking(xp_errno())) {
+                               break;
+                       }
+               }
+
+       } while (--sanity > 0 && wsh->block && wrote < bytes);
+
        //if (r<0) {
                //printf("wRITE FAIL: %s\n", strerror(errno));
        //}