diff --git a/sys/net/application_layer/gcoap/gcoap.c b/sys/net/application_layer/gcoap/gcoap.c index 87196d80ed216..32c4a6cb678ae 100644 --- a/sys/net/application_layer/gcoap/gcoap.c +++ b/sys/net/application_layer/gcoap/gcoap.c @@ -771,6 +771,7 @@ size_t gcoap_req_send2(const uint8_t *buf, size_t len, memo->msg.data.pdu_buf = &_coap_state.resend_bufs[i*GCOAP_PDU_BUF_SIZE]; memcpy(memo->msg.data.pdu_buf, buf, GCOAP_PDU_BUF_SIZE); memo->msg.data.pdu_len = len; + break; } } if (memo->msg.data.pdu_buf) {