plgd-dev / go-coap

Implementation of CoAP Server & Client in Go
https://coap.technology
Apache License 2.0
447 stars 116 forks source link

fix: do not attempt serve DTLS connection on accept error #489

Closed hasheddan closed 1 year ago

hasheddan commented 1 year ago

Updates the DTLS server to skip serving a DTLS connection when an error is returned. Previously, if an error was returned that did not meet the criteria of shutting down the server altogether, a non-nil DTLS connection would still attempt to be served. This can cause a panic if the net.Conn interface is non-nil, but the underlying value is.

Fixes #488

hasheddan commented 1 year ago

cc @jkralik

jkralik commented 1 year ago

Thx for the fix :)