go-coap
go-coap copied to clipboard
Enable inactivity monitor for DTLS/UDP by default
I'm not using DTLS.
Ah, I think the confusing part is the defaults. The example code and the main README.md produces code that effectively leaks connections? Is this ever desired? In long-running scenarios or under load clients will invariably connect and re-connect (especially IoT's with flaky connection, watchdogs etc.), and this adds up over time.
Seems it's not limited to DTLS: https://github.com/plgd-dev/go-coap/blob/073d2c281d8b19a671bfdd826fc4b8b8dfe8bb66/udp/server.go#L58-L60
Perhaps the default should be set to something or be clarified in the README?
Originally posted by @JosefWN in https://github.com/plgd-dev/go-coap/issues/311#issuecomment-1068702398