Closed gaukas closed 7 months ago
I again observed some potentially related behavior during implementing a test case. A net.Listener
became closed without a party explicitly calling .Close()
. Need some stable reproduce but I will just keep this for record today.
Confirmed irrelevance, closing.
Cause
In e8cc8e6bdeced3115617d990f33b551714c1db66 we patched the unsafe
defer
as suggested by deepsource and therefore we are returning with the error returned by.Close()
in a few functions.Example
(net.Listener).Close()
returns a non-crashing error without impacting the program safeness/liveness.https://github.com/gaukas/water/actions/runs/6473922694/attempts/1
Suggested Fix
water/socket
library (otherwise it will be essentially unsafe again).water
when callingsocket.UnixConnPair()
, caller should proceed if returned error pair is notnil
even when the error is non-nil
.