mirror of
https://github.com/holub/mame
synced 2025-05-30 17:41:47 +03:00
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:
parent
7000a5202a
commit
937e416814
@ -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;
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
{
|
||||
// no data available
|
||||
actual = 0;
|
||||
return std::error_condition();
|
||||
return std::errc::operation_would_block;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
{
|
||||
// no data available
|
||||
actual = 0;
|
||||
return std::error_condition();
|
||||
return std::errc::operation_would_block;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user