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
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 0 deletions

View File

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