Skip to content

Commit

Permalink
undo sendall() change unrelated to the bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vashek committed Nov 4, 2020
1 parent add128a commit e6977b3
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions cheroot/ssl/pyopenssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,20 @@ def readline(self, size=-1):
)

def read(self, *args, **kwargs):
"""Read from the wrapped socket, with retry."""
"""Read from the wrapped socket."""
return self._safe_call(
True,
super(SSLFileobjectMixin, self).read,
*args, **kwargs
)

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

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

0 comments on commit e6977b3

Please sign in to comment.