mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
limit clear buffer iterations.
This commit is contained in:
parent
2aa95ab812
commit
1ee191a726
@ -142,6 +142,7 @@ static void biforce_clear_buffer(struct cgpu_info *bitforce)
|
|||||||
{
|
{
|
||||||
int fdDev = bitforce->device_fd;
|
int fdDev = bitforce->device_fd;
|
||||||
char pdevbuf[0x100];
|
char pdevbuf[0x100];
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
if (!fdDev)
|
if (!fdDev)
|
||||||
return;
|
return;
|
||||||
@ -152,7 +153,7 @@ static void biforce_clear_buffer(struct cgpu_info *bitforce)
|
|||||||
do {
|
do {
|
||||||
pdevbuf[0] = '\0';
|
pdevbuf[0] = '\0';
|
||||||
BFgets(pdevbuf, sizeof(pdevbuf), fdDev);
|
BFgets(pdevbuf, sizeof(pdevbuf), fdDev);
|
||||||
} while (pdevbuf[0]);
|
} while (pdevbuf[0] && (++count < 10));
|
||||||
mutex_unlock(&bitforce->device_mutex);
|
mutex_unlock(&bitforce->device_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user