Repository : ssh://git@open-mesh.org/alfred
On branch : master
commit 5957fb5f70cf75a69bac9826a05c137c5017e554 Author: Sven Eckelmann sven@open-mesh.com Date: Thu Jan 17 19:05:44 2013 +0100
alfred: Directly finish request when transaction was finished
The unix socket client doesn't have to wait until the timeout is over when he already has finished the transaction.
Signed-off-by: Sven Eckelmann sven@open-mesh.com
5957fb5f70cf75a69bac9826a05c137c5017e554 unix_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/unix_sock.c b/unix_sock.c index f5e8b08..206b43d 100644 --- a/unix_sock.c +++ b/unix_sock.c @@ -193,7 +193,7 @@ static int unix_sock_req_data(struct globals *globals, while (1) { clock_gettime(CLOCK_MONOTONIC, &now); now.tv_sec -= ALFRED_REQUEST_TIMEOUT; - if (!time_diff(&last_check, &now, &tv)) + if (!time_diff(&last_check, &now, &tv) || head->finished) break;
FD_SET(globals->netsock, &fds);