Change in vdsm[ovirt-3.5]: ssl: ssl socket may throw sslerror during reading

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Thu Sep 24 09:00:50 UTC 2015


Piotr Kliczewski has uploaded a new change for review.

Change subject: ssl: ssl socket may throw sslerror during reading
......................................................................

ssl: ssl socket may throw sslerror during reading

When client closes socket in not clean way sometimes we can get SSLError
with unexpected eof. When this situation occurs we need to make sure to
handle this situation properly.


Bug-Url: https://bugzilla.redhat.com/1265965
Change-Id: I8de60d91f81b08e9cb78df07f09d2bcc903c1bad
Signed-off-by: pkliczewski <piotr.kliczewski at gmail.com>
---
M lib/yajsonrpc/betterAsyncore.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/46659/1

diff --git a/lib/yajsonrpc/betterAsyncore.py b/lib/yajsonrpc/betterAsyncore.py
index 70bfb7e..f4fe768 100644
--- a/lib/yajsonrpc/betterAsyncore.py
+++ b/lib/yajsonrpc/betterAsyncore.py
@@ -24,6 +24,7 @@
 from threading import Lock
 
 from collections import deque
+from M2Crypto import SSL
 
 
 # This is a copy of the standard library asyncore converted to support
@@ -299,6 +300,8 @@
                 return ''
             else:
                 raise
+        except SSL.SSLError:
+            self.handle_close()
 
     def send(self, data):
         try:


-- 
To view, visit https://gerrit.ovirt.org/46659
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8de60d91f81b08e9cb78df07f09d2bcc903c1bad
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>


More information about the vdsm-patches mailing list