mirror of
https://github.com/open-simh/simh.git
synced 2026-02-21 14:58:35 +00:00
Avoid permanent network network hangs when a network transport starts to return errors for various reasons. These hangs also result in at least one thread in a CPU bound loop attempting to read on a pcap connection which will never be useful again. When transmit or receive errors occur, the invoking thread sleeps for 1 second and subsequent operations proceed. When the total of read + write errors reaches a multiple of ETH_ERROR_REOPEN_THRESHOLD the current transport connection (usually pcap) is closed and re-opened after a ETH_ERROR_REOPEN_PAUSE second delay. If the open succeeds, we're happy. If it fails, then the link behaves as if it were never attached until some subsequent operator intervention is performed. Activities which are known to induce this problems include (but are not limited to) when a simulator is running in a Windows Virtual Machine on a Hyper-V host system and the Hyper-V host system performs a SAVE and a subsequent Restart of the Guest Windows Virtual Machine. This operation can occur due to specific operator requests or merely when the Hyper-V host system reboots.
41 KiB
41 KiB