Closed GreenLightning closed 2 years ago
If ListenPacket returns an error, c is nil and the deferred call to c.Close() will panic.
ListenPacket
c
nil
c.Close()
Fix this by returning early from the method.
This happens for example if the address is already in use (e.g. two processes trying to run SendProbe concurrently).
SendProbe
thx
If
ListenPacket
returns an error,c
isnil
and the deferred call toc.Close()
will panic.Fix this by returning early from the method.
This happens for example if the address is already in use (e.g. two processes trying to run
SendProbe
concurrently).