Author: mihai.do...@gmail.com
Branch: py3.5
Changeset: r92643:66e8282940aa
Date: 2017-09-25 18:18 +0300
http://bitbucket.org/pypy/pypy/changeset/66e8282940aa/

Log:    Recverr hotfix

diff --git a/rpython/rlib/_rsocket_rffi.py b/rpython/rlib/_rsocket_rffi.py
--- a/rpython/rlib/_rsocket_rffi.py
+++ b/rpython/rlib/_rsocket_rffi.py
@@ -534,7 +534,7 @@
             int cmsg_status;
             struct iovec iov;
             struct recvmsg_info* retinfo;
-            int error_flag;   // variable to be set in case of special errors.
+            int error_flag = 0;   // variable to be set in case of special 
errors.
             int cmsgdatalen = 0;
 
             // variables that are set to 1, if the message charp has been 
allocated
@@ -708,6 +708,7 @@
                     free(retinfo);
                 }
             }
+            if (error_flag==0) error_flag = -1;
             return error_flag;
 
         err_closefds:
diff --git a/rpython/rlib/rsocket.py b/rpython/rlib/rsocket.py
--- a/rpython/rlib/rsocket.py
+++ b/rpython/rlib/rsocket.py
@@ -1074,7 +1074,7 @@
 
             if address is not None:
                 address.unlock()
-            if _c.geterrno() == _c.EINTR:
+            if (_c.geterrno() == _c.EINTR) or (_c.geterrno() == 11):
                 raise last_error()
             if (reply == -10000):
                 raise RSocketError("Invalid message size")
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to