net: lwm2m: lwm2m stops sending messages after encountering signals on send
Fixed issue that caused message to be not correctly reset even after it is consumed after send sets errno to EAGAIN or EWOULDBLOCK Signed-off-by: Dominik Dess <dominik.dess@grandcentrix.net>
This commit is contained in:
parent
93c0eb94a3
commit
f55c473a06
1 changed files with 0 additions and 5 deletions
|
@ -1048,11 +1048,6 @@ static int lwm2m_send_message(struct lwm2m_message *msg)
|
|||
rc = send(msg->ctx->sock_fd, msg->cpkt.data, msg->cpkt.offset, 0);
|
||||
|
||||
if (rc < 0) {
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||
LOG_WRN("Failed to send packet, would block");
|
||||
return -errno;
|
||||
}
|
||||
|
||||
LOG_ERR("Failed to send packet, err %d", errno);
|
||||
if (msg->type != COAP_TYPE_CON) {
|
||||
lwm2m_reset_message(msg, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue