raw tcp mode: use ssl_read_select

This commit is contained in:
Maximilian Hils 2015-09-10 11:33:03 +02:00
parent 3b6140dfff
commit ebba79b655

View File

@ -4,7 +4,7 @@ import select
from OpenSSL import SSL from OpenSSL import SSL
from netlib.tcp import NetLibError from netlib.tcp import NetLibError, ssl_read_select
from netlib.utils import cleanBin from netlib.utils import cleanBin
from ..exceptions import ProtocolException from ..exceptions import ProtocolException
from .base import Layer from .base import Layer
@ -28,7 +28,7 @@ class RawTCPLayer(Layer):
try: try:
while True: while True:
r, _, _ = select.select(conns, [], [], 10) r = ssl_read_select(conns, 10)
for conn in r: for conn in r:
dst = server if conn == client else client dst = server if conn == client else client