socket: return from loop after EOF

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 8cd3b00420)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Tonis Tiigi
2024-01-19 17:06:43 -08:00
committed by Sebastiaan van Stijn
parent 01f9332618
commit 4e097c643d

View File

@ -65,6 +65,7 @@ func ConnectAndWait(cb func()) {
_, err := conn.Read(b)
if errors.Is(err, io.EOF) {
cb()
return
}
}
}()