Skip to content

Commit 72b3d30

Browse files
authored
Merge pull request #3 from gpu-ninja/main
fix: Close the errors channel when a client disconnect occurs
2 parents c074303 + 2dbf323 commit 72b3d30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/client/nbd.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ n:
315315
}
316316

317317
go func() {
318+
defer func() {
319+
close(fatal)
320+
}()
321+
318322
if _, _, err := syscall.Syscall(
319323
syscall.SYS_IOCTL,
320324
device.Fd(),

0 commit comments

Comments
 (0)