plgd-dev / go-coap

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

Mux provides user with internal map #496

Open HRogge opened 11 months ago

HRogge commented 11 months ago

The Mux-router function GetRoutes() returns the user a direct "reference" to the internal map, which is NOT a copy. This defeats the purpose of the locking mechanism in the router.

HRogge commented 11 months ago

Should be fixed by #497

hmm... now that I look at GetRoute(), it also leaks access to the lock-protected data...