coapjs / node-coap

CoAP - Node.js style
MIT License
528 stars 154 forks source link

fix: fix IPv6 related multicast problem #339

Closed JKRhb closed 2 years ago

JKRhb commented 2 years ago

I noticed that there is a problem with IPv6 multicast addresses in the server right now. This PR adds a test case to illustrate the problem and a workaround to fix it, as iterating over all IPv6 interfaces does not work as it does in the IPv4 case.

The new test is skipped in the case of Mac OS as there seem to be problems related to IPv6 multicast (addMembership EADDRNOTAVAIL).

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2213445822


Changes Missing Coverage Covered Lines Changed/Added Lines %
test/server.ts 31 35 88.57%
<!-- Total: 36 40 90.0% -->
Files with Coverage Reduction New Missed Lines %
lib/outgoing_message.ts 1 97.92%
index.ts 2 93.43%
lib/helpers.ts 2 97.07%
lib/observe_read_stream.ts 2 92.21%
lib/observe_write_stream.ts 2 95.1%
lib/cache.ts 3 92.0%
lib/segmentation.ts 3 89.58%
lib/option_converter.ts 4 94.39%
lib/middlewares.ts 5 87.4%
lib/agent.ts 28 87.27%
<!-- Total: 97 -->
Totals Coverage Status
Change from base Build 2201295132: 7.3%
Covered Lines: 8681
Relevant Lines: 9085

💛 - Coveralls