socket: return from loop after EOF

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2024-01-19 17:06:43 -08:00
parent e2519aefcb
commit 8cd3b00420
No known key found for this signature in database
GPG Key ID: AFA9DE5F8AB7AF39
1 changed files with 1 additions and 0 deletions

View File

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