Change in vdsm[master]: ssl: ssl socket may throw sslerror during reading

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Wed Sep 23 15:02:03 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/1256446
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/25/46625/1

diff --git a/lib/yajsonrpc/betterAsyncore.py b/lib/yajsonrpc/betterAsyncore.py
index ef5738b..7896aaf 100644
--- a/lib/yajsonrpc/betterAsyncore.py
+++ b/lib/yajsonrpc/betterAsyncore.py
@@ -21,6 +21,7 @@
 import socket
 from errno import EWOULDBLOCK
 
+from vdsm.m2cutils import SSL
 from vdsm.infra.eventfd import EventFD
 from vdsm.utils import traceback
 
@@ -122,6 +123,8 @@
                 return ''
             else:
                 raise
+        except SSL.SSLError:
+            self.handle_close()
 
     def send(self, data):
         try:


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

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


More information about the vdsm-patches mailing list