diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-02-08 18:56:06 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-02-08 18:56:06 +0100 |
commit | 0fb894b797dfe31e977749ac2ac579b877be3838 (patch) | |
tree | 568ec1640ac4f87ae2279f50cbc1e9226c8cd912 | |
parent | c69812297e1534f97fdca635fcab62f1686c35aa (diff) |
wpa: reduce default timeout to 1s
Instead of waiting 10s for an answer, lets use 1s as default.
wpa-supplicant sometimes performs blocking actions that *might* take a
while. However, waiting 10s just screws the whole applications and is the
wrong approach to fix that. wpa_supplicant needs to learn asynchronous
transactions and deal with incoming requests in a timely manner.
Therefore, set the default to 1s and be happy \o/
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r-- | src/wpa_ctrl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wpa_ctrl.c b/src/wpa_ctrl.c index e266c2b..95396a5 100644 --- a/src/wpa_ctrl.c +++ b/src/wpa_ctrl.c @@ -720,8 +720,8 @@ static int wpa_request(int fd, const void *cmd, size_t cmd_len, return -EINVAL; *reply_len -= 1; - /* use a maximum of 10s */ - max = 10LL * 1000LL * 1000LL; + /* use a maximum of 1s */ + max = 1LL * 1000LL * 1000LL; if (*t < 0 || *t > max) *t = max; |