coap-server.c: fixed wait time for coap_run_once() invocation

In the main of examples/coap-server.c wait_ms was set to
COAP_RESOURCE_CHECK_TIME * 1000, then coap_run_once() was invoked
with parameter timeout_ms as COAP_RESOURCE_CHECK_TIME * wait_ms,
i.e., squaring the resource check time.

This bug has been fixed by removing COAP_RESOURCE_CHECK_TIME from
the call to coap_run_once().

Signed-off-by: Olaf Bergmann <bergmann@tzi.org>
This commit is contained in:
John Carter authored and Olaf Bergmann committed 2017-08-08 12:23:41 +02:00
1 parent 50da9f1d97
commit d7ebf14395
1 file changed
+1 -1
+1 -1
View File
@@ -537,7 +537,7 @@ main(int argc, char **argv) {
wait_ms = COAP_RESOURCE_CHECK_TIME * 1000;
while ( !quit ) {
int result = coap_run_once( ctx, COAP_RESOURCE_CHECK_TIME * wait_ms );
int result = coap_run_once( ctx, wait_ms );
if ( result < 0 ) {
break;
} else if ( (unsigned)result < wait_ms ) {