plgd-dev / go-coap

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

net: implement IsConnectionBrokenError for Plan 9 #528

Closed erenberg closed 6 months ago

jkralik commented 7 months ago

@erenberg I'm not familiar with the Plan 9 OS. Could you please explain the reason for adding the IsConnectionBrokenError function?

erenberg commented 7 months ago

On Tuesday, January 30, 2024 8:31:45 AM CET, Jozef Kralik wrote:

@erenberg I'm not familiar with the Plan 9 OS. Could you please explain the reason for adding the IsConnectionBrokenError function?

IsConnectionBrokenError is a function that is used but not implemented for Plan 9.

Returning false when checking error types is standard for Go on Plan 9: https://cs.opensource.google/go/go/+/refs/tags/go1.21.6:src/net/error_plan9.go

This makes go-coap work on Plan 9 and has no effect on other platforms.

erenberg commented 7 months ago

The other implementations of IsConnectionBrokenError:

https://github.com/plgd-dev/go-coap/blob/master/net/error_unix.go https://github.com/plgd-dev/go-coap/blob/master/net/error_windows.go

jkralik commented 6 months ago

Thx for contribution 👍