plgd-dev / go-coap

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

ListenAndServeWithOptions doesn't correctly start UDP server #526

Closed sdeboeck closed 6 months ago

sdeboeck commented 7 months ago

The ListenAndServeWithOptions function does not correctly start the UDP server when using udpServer.Option. The UDP options are not being populated, leading to unexpected behavior.

Steps to Reproduce

  1. Use the ListenAndServeWithOptions function to start a CoAP server with UDP
  2. Provide options.WithMux option.
  3. The server doesn't invoke the desired handlers.

https://github.com/plgd-dev/go-coap/blob/c61c6485126a661ad05a5b49080ed604e7ad3cc3/server.go#L87

Danielius1922 commented 6 months ago

Fixed by the linked PR.