Skip to content

Commit

Permalink
examples/nanocoap_server: 5.03 only for different requests to /separate
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian18 committed May 27, 2024
1 parent b6aa7a6 commit 9dfdf2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/nanocoap_server/coap_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static ssize_t _separate_handler(coap_pkt_t *pkt, uint8_t *buf, size_t len, coap
static event_timeout_t event_timeout;
static event_callback_t event_timed = EVENT_CALLBACK_INIT(_send_response, &_separate_ctx);

if (event_timeout_is_pending(&event_timeout)) {
if (event_timeout_is_pending(&event_timeout) && !sock_udp_ep_equal(context->remote, &_separate_ctx.remote)) {
puts("_separate_handler(): response already scheduled");
return coap_build_reply(pkt, COAP_CODE_SERVICE_UNAVAILABLE, buf, len, 0);
}
Expand Down

0 comments on commit 9dfdf2b

Please sign in to comment.