I/O Intr bugfix: lines where lost when not read in one chunk
This commit is contained in:
@ -841,6 +841,16 @@ readHandler()
|
|||||||
asynStatusStr[status]);
|
asynStatusStr[status]);
|
||||||
}
|
}
|
||||||
// pasynOctet->read() has already cut off terminator.
|
// pasynOctet->read() has already cut off terminator.
|
||||||
|
|
||||||
|
if (status == asynTimeout &&
|
||||||
|
pasynUser->timeout == 0.0 &&
|
||||||
|
received > 0)
|
||||||
|
{
|
||||||
|
// Jens Eden (PTB) pointed out that polling asynInterposeEos
|
||||||
|
// with timeout = 0.0 returns asynTimeout even when bytes
|
||||||
|
// have been received, but not yet the terminator.
|
||||||
|
status = asynSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
@ -922,8 +932,8 @@ readHandler()
|
|||||||
// read timeout
|
// read timeout
|
||||||
#ifndef NO_TEMPORARY
|
#ifndef NO_TEMPORARY
|
||||||
debug("AsynDriverInterface::readHandler(%s): "
|
debug("AsynDriverInterface::readHandler(%s): "
|
||||||
"ioAction=%s, timeout after %d of %d bytes \"%s\"\n",
|
"ioAction=%s, timeout [%f seconds] after %d of %d bytes \"%s\"\n",
|
||||||
clientName(), ioActionStr[ioAction],
|
clientName(), ioActionStr[ioAction], pasynUser->timeout,
|
||||||
(int)received, bytesToRead,
|
(int)received, bytesToRead,
|
||||||
StreamBuffer(buffer, received).expand()());
|
StreamBuffer(buffer, received).expand()());
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user