ETHER: Fix asynch reader thread rundown in error recovery path.
This commit is contained in:
parent
4d817f1deb
commit
9a0d035e78
1 changed files with 7 additions and 5 deletions
|
@ -1651,6 +1651,7 @@ while (dev->handle) {
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
++dev->receive_packet_errors;
|
++dev->receive_packet_errors;
|
||||||
_eth_error (dev, "_eth_reader");
|
_eth_error (dev, "_eth_reader");
|
||||||
|
if (dev->handle) { /* Still attached? */
|
||||||
#if defined (_WIN32)
|
#if defined (_WIN32)
|
||||||
hWait = (dev->eth_api == ETH_API_PCAP) ? pcap_getevent ((pcap_t*)dev->handle) : NULL;
|
hWait = (dev->eth_api == ETH_API_PCAP) ? pcap_getevent ((pcap_t*)dev->handle) : NULL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1664,6 +1665,7 @@ while (dev->handle) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sim_debug(dev->dbit, dev->dptr, "Reader Thread Exiting\n");
|
sim_debug(dev->dbit, dev->dptr, "Reader Thread Exiting\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue