Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def ensure_read(self, size):
# type: (int) -> None
while self.unread_len < size:
s, e = self.recv()
if s < 0:
raise SSH.Socket.InsufficientReadException(e)