porech / engarde

A go network utility to create a reliable IP tunnel over multiple connections
GNU General Public License v2.0
275 stars 41 forks source link

Check error returned from SetWriteDeadline #47

Closed DavidMazary closed 4 years ago

DavidMazary commented 4 years ago

This PR checks the error value returned by SetWriteDeadline and logs the error at the Warning level.

No further error-handling action is taken since the subsequent UDP write should not be impeded.

I found this issue by running golangci-lint against this code, other findings were trivial.

ale-rinaldi commented 4 years ago

Thank you @DavidMazary , the engarde code as it is now is working but quite dirty, I just reached the "it works" levels and stopped there. I'm now in the process of a refactor, that is most like taking it and writing it again from scratch, but it's quite a long job if you do it the right way... Meanwhile I'm merging this one. Thanks!