diff --git a/lib/nntp/tiny/buffer.py b/lib/nntp/tiny/buffer.py index 5fb5587..499f8d9 100644 --- a/lib/nntp/tiny/buffer.py +++ b/lib/nntp/tiny/buffer.py @@ -1,3 +1,5 @@ +import socket + class BufferOverflow(Exception): def __init__(self): super().__init__("Buffer overflow") @@ -17,7 +19,7 @@ class LineBuffer(): # Check and see if there is already a line in the # internal buffer. # - offset = self.buf.find(b'\n', self.offset, self.count) + offset = self.buf.find(b'\n', self.offset, len(self.buf)) if offset < 0: #