Skip to content

Commit bab03e9

Browse files
vashekwebknjaz
authored andcommitted
undo sendall() change unrelated to the bug fix
1 parent f0cc8ab commit bab03e9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

cheroot/ssl/pyopenssl.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,20 @@ def readline(self, size=-1):
146146
)
147147

148148
def read(self, *args, **kwargs):
149-
"""Read from the wrapped socket, with retry."""
149+
"""Read from the wrapped socket."""
150150
return self._safe_call(
151151
True,
152152
super(SSLFileobjectMixin, self).read,
153153
*args, **kwargs
154154
)
155155

156156
def sendall(self, *args, **kwargs):
157-
"""Send whole message to the socket. Unsupported, do not use."""
158-
# Not supported due to https://github.com/pyca/pyopenssl/issues/176.
159-
# Until that bug is fixed, sendall() may throw SSL.WantWriteError, but
160-
# there is no correct way to retry the call because we don't know how
161-
# many bytes were already transmitted. We could work around this by
162-
# reimplementing sendall() using send(), but we don't actually use
163-
# sendall() anywhere.
164-
raise NotImplementedError('sendall() is unsupported by pyOpenSSL')
157+
"""Send whole message to the socket."""
158+
return self._safe_call(
159+
False,
160+
super(SSLFileobjectMixin, self).sendall,
161+
*args, **kwargs
162+
)
165163

166164
def send(self, *args, **kwargs):
167165
"""Send some part of message to the socket."""

0 commit comments

Comments
 (0)