Skip to content

Commit f9d7483

Browse files
committed
unicoap: dtls handshake timeout
1 parent 43a3b89 commit f9d7483

File tree

1 file changed

+3
-2
lines changed
  • sys/net/application_layer/unicoap/drivers/rfc7252/dtls

1 file changed

+3
-2
lines changed

sys/net/application_layer/unicoap/drivers/rfc7252/dtls/transport.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ int unicoap_transport_sendv_dtls(iolist_t* iolist, const sock_udp_ep_t* remote,
247247

248248
if (unlikely(local)) {
249249
sock_dtls_aux_tx_t aux_tx = { .flags = SOCK_AUX_SET_LOCAL, .local = *local };
250-
res = sock_dtls_sendv_aux(&_dtls_socket, session, iolist, SOCK_NO_TIMEOUT, &aux_tx);
250+
res = sock_dtls_sendv_aux(&_dtls_socket, session, iolist, 500000, &aux_tx);
251251
}
252252
else {
253253
res = sock_dtls_sendv_aux(&_dtls_socket, session, iolist,
@@ -256,8 +256,9 @@ int unicoap_transport_sendv_dtls(iolist_t* iolist, const sock_udp_ep_t* remote,
256256
DTLS_DEBUG("done sending\n");
257257

258258
switch (res) {
259-
case -EHOSTUNREACH:
259+
case -EHOSTUNREACH: // todo: not one of the return values
260260
case -ENOTCONN:
261+
case -ETIMEDOUT:
261262
case 0:
262263
DTLS_DEBUG("DTLS sock not connected or remote unreachable. "
263264
"Destroying session.\n");

0 commit comments

Comments
 (0)