diff options
Diffstat (limited to 'hardinfo2/arch/linux')
| -rw-r--r-- | hardinfo2/arch/linux/common/sensors.h | 11 | 
1 files changed, 4 insertions, 7 deletions
| diff --git a/hardinfo2/arch/linux/common/sensors.h b/hardinfo2/arch/linux/common/sensors.h index 946de968..652273d2 100644 --- a/hardinfo2/arch/linux/common/sensors.h +++ b/hardinfo2/arch/linux/common/sensors.h @@ -276,7 +276,7 @@ read_sensors_hddtemp(void)      gint len = 0;      if ((s = sock_connect("127.0.0.1", 7634))) { -        while (len <= 2) +        while (!len)              len = sock_read(s, buffer, sizeof(buffer));          sock_close(s); @@ -309,13 +309,10 @@ read_sensors_hddtemp(void)              }              g_strfreev(disks); -        } else { -            /* FIXME: This might go crazy in an infinite loop. */ -            g_warning("reading hddtemp failed. retrying in 100ms"); -            nonblock_sleep(100); -            read_sensors_hddtemp(); -            return;          } +    } else { +        g_free(old); +        old = NULL;      }      if (old) { | 
