osd: Return would block when reading a socket with no data available - no error can be confused with remote shutdown.

This commit is contained in:
Vas Crabb 2021-08-27 14:06:49 +10:00
parent 7000a5202a
commit 937e416814
3 changed files with 4 additions and 4 deletions

View File

@ -135,9 +135,9 @@ u8 beckerport_device::read(offs_t offset)
case DWS_STATUS:
if (!m_rx_pending)
{
/* Try to read from dws */
// Try to read from dws
std::error_condition filerr = m_pSocket->read(m_buf, 0, sizeof(m_buf), m_rx_pending);
if (filerr)
if (filerr && (std::errc::operation_would_block != filerr))
osd_printf_error("%s: coco_dwsock.c: beckerport_device::read() socket read operation failed with error %s:%d %s\n", tag(), filerr.category().name(), filerr.value(), filerr.message());
else
m_head = 0;

View File

@ -106,7 +106,7 @@ public:
{
// no data available
actual = 0;
return std::error_condition();
return std::errc::operation_would_block;
}
}

View File

@ -103,7 +103,7 @@ public:
{
// no data available
actual = 0;
return std::error_condition();
return std::errc::operation_would_block;
}
}