Fix: Windows handle error on disconnect.
This commit is contained in:
parent
50a91cef9f
commit
aa15313aa8
|
@ -312,10 +312,13 @@ when defined(windows):
|
||||||
transp.state.incl(ReadPaused)
|
transp.state.incl(ReadPaused)
|
||||||
elif int(err) == ERROR_OPERATION_ABORTED:
|
elif int(err) == ERROR_OPERATION_ABORTED:
|
||||||
# CancelIO() interrupt
|
# CancelIO() interrupt
|
||||||
discard
|
transp.state.incl(ReadPaused)
|
||||||
|
elif int(err) == ERROR_NETNAME_DELETED:
|
||||||
|
transp.state.incl({ReadEof, ReadPaused})
|
||||||
else:
|
else:
|
||||||
transp.setReadError(err)
|
transp.setReadError(err)
|
||||||
if not isNil(transp.reader):
|
if not isNil(transp.reader):
|
||||||
|
if not transp.reader.finished:
|
||||||
transp.finishReader()
|
transp.finishReader()
|
||||||
if ReadPaused in transp.state:
|
if ReadPaused in transp.state:
|
||||||
# Transport buffer is full, so we will not continue on reading.
|
# Transport buffer is full, so we will not continue on reading.
|
||||||
|
|
Loading…
Reference in New Issue