Use disconnect by server as a regular terminator (e.g. web pages)
This commit is contained in:
@ -877,17 +877,14 @@ readHandler()
|
|||||||
clientName(), asynStatusStr[status], ioActionStr[ioAction],
|
clientName(), asynStatusStr[status], ioActionStr[ioAction],
|
||||||
(long)received,eomReasonStr[eomReason&0x7],
|
(long)received,eomReasonStr[eomReason&0x7],
|
||||||
StreamBuffer(buffer, received).expand()());
|
StreamBuffer(buffer, received).expand()());
|
||||||
|
|
||||||
pasynManager->isConnected(pasynUser, &connected);
|
pasynManager->isConnected(pasynUser, &connected);
|
||||||
debug("AsynDriverInterface::readHandler(%s): "
|
debug("AsynDriverInterface::readHandler(%s): "
|
||||||
"device is %sconnected\n",
|
"device is now %sconnected\n",
|
||||||
clientName(),connected?"":"dis");
|
clientName(),connected?"":"dis");
|
||||||
if (!connected) {
|
// asyn 4.16 sets reason to ASYN_EOM_END when device disconnects.
|
||||||
error("%s: connection closed in read\n",
|
// What about earlier versions?
|
||||||
clientName());
|
if (!connected) eomReason |= ASYN_EOM_END;
|
||||||
readCallback(StreamIoFault);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// pasynOctet->read() has already cut off terminator.
|
|
||||||
|
|
||||||
if (status == asynTimeout &&
|
if (status == asynTimeout &&
|
||||||
pasynUser->timeout == 0.0 &&
|
pasynUser->timeout == 0.0 &&
|
||||||
|
Reference in New Issue
Block a user