From 5086b1781c31817cc0d3d39258fc7b46645d61ec Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Fri, 28 Mar 2014 06:47:17 +0100 Subject: [PATCH] Reduce the timeout to one second. A packet usually takes only a few milliseconds to transfer, so one second is still plenty of margin. --- src/oceanic_atom2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c index 57bad05..eb75050 100644 --- a/src/oceanic_atom2.c +++ b/src/oceanic_atom2.c @@ -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);