mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-21 06:49:05 +03:00
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:
1 parent
50da9f1d97
commit
d7ebf14395
1 file changed
+1
-1
@@ -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 ) {
|
||||
|
||||
Reference in new issue
Block a user