Cleanup and note more work

This commit is contained in:
Nate Brown
2025-04-16 21:56:53 -05:00
committed by JackDoan
parent 1f01a5543b
commit e96e9e3cfa
5 changed files with 20 additions and 15 deletions

View File

@@ -122,7 +122,7 @@ func (u *StdConn) LocalAddr() (netip.AddrPort, error) {
}
}
func (u *StdConn) ListenOut(r EncReader) {
func (u *StdConn) ListenOut(r EncReader) error {
var ip netip.Addr
msgs, buffers, names := u.PrepareRawMessages(u.batch)
@@ -134,8 +134,7 @@ func (u *StdConn) ListenOut(r EncReader) {
for {
n, err := read(msgs)
if err != nil {
u.l.WithError(err).Debug("udp socket is closed, exiting read loop")
return
return err
}
for i := 0; i < n; i++ {