mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-26 14:34:16 +00:00
Set last device valid work on adding device.
This commit is contained in:
parent
3fa4a9f55f
commit
a3bbe0e116
@ -6998,6 +6998,10 @@ bool add_cgpu(struct cgpu_info*cgpu)
|
|||||||
devices = realloc(devices, sizeof(struct cgpu_info *) * (total_devices + new_devices + 2));
|
devices = realloc(devices, sizeof(struct cgpu_info *) * (total_devices + new_devices + 2));
|
||||||
wr_unlock(&devices_lock);
|
wr_unlock(&devices_lock);
|
||||||
|
|
||||||
|
mutex_lock(&stats_lock);
|
||||||
|
cgpu->last_device_valid_work = time(NULL);
|
||||||
|
mutex_unlock(&stats_lock);
|
||||||
|
|
||||||
if (hotplug_mode)
|
if (hotplug_mode)
|
||||||
devices[total_devices + new_devices++] = cgpu;
|
devices[total_devices + new_devices++] = cgpu;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user