Reduce the timeout to one second.

A packet usually takes only a few milliseconds to transfer, so one
second is still plenty of margin.
This commit is contained in:
Jef Driesen 2014-03-28 06:47:17 +01:00
parent f0faebb3a1
commit 5086b1781c

View File

@ -450,8 +450,8 @@ oceanic_atom2_device_open (dc_device_t **out, dc_context_t *context, const char
return DC_STATUS_IO;
}
// Set the timeout for receiving data (3000 ms).
if (serial_set_timeout (device->port, 3000) == -1) {
// Set the timeout for receiving data (1000 ms).
if (serial_set_timeout (device->port, 1000) == -1) {
ERROR (context, "Failed to set the timeout.");
serial_close (device->port);
free (device);