mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-09 18:32:53 +03:00
coap-client: let observe duration override the default wait timeout
This commit is contained in:
1 parent
6f4c8b68de
commit
4d2ceb6dbb
1 file changed
+3
@@ -2018,6 +2018,9 @@ main(int argc, char **argv) {
|
||||
/* Allow for other servers to respond within DEFAULT_LEISURE RFC7252 8.2 */
|
||||
wait_seconds = coap_session_get_default_leisure(session).integer_part + 1;
|
||||
|
||||
if (obs_seconds > wait_seconds && wait_seconds == DEFAULT_WAIT_TIME)
|
||||
wait_seconds = obs_seconds;
|
||||
|
||||
wait_ms = wait_seconds * 1000;
|
||||
coap_log_debug("timeout is set to %u seconds\n", wait_seconds);
|
||||
|
||||
|
||||
Reference in new issue
Block a user