Skip to content

Commit

Permalink
Fix an exception (detail)
Browse files Browse the repository at this point in the history
  • Loading branch information
jczic committed Jan 13, 2024
1 parent 40fc58f commit 55974f9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions MicroWebSrv2/libs/XAsyncSockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,14 @@ def OnReadyForReading(self) :
break
return
elif b != b'\r' :
if self._rdLinePos < self._recvBufSlot.Size :
self._recvBufSlot.Buffer[self._rdLinePos] = ord(b)
self._rdLinePos += 1
else :
self._close()
try :
if self._rdLinePos < self._recvBufSlot.Size :
self._recvBufSlot.Buffer[self._rdLinePos] = ord(b)
self._rdLinePos += 1
else :
self._close()
return
except :
return
else :
self._close(XClosedReason.ClosedByPeer)
Expand Down

0 comments on commit 55974f9

Please sign in to comment.