X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/d8f3785bb69288663f4cc46bf4d609c6770452d5..9301f77a5709fe7daea3a71f8dd072c6cd7df4fe:/backup.go?ds=sidebyside diff --git a/backup.go b/backup.go index 517b7c7..c03e633 100644 --- a/backup.go +++ b/backup.go @@ -37,7 +37,8 @@ func backup(ctx context.Context, path string, out io.Writer) (err error) { }() stop := context.AfterFunc(ctx, func() { - _ = conn.Close() + // Cancellation closes the socket only to interrupt pending I/O. + conn.Close() // nolint: errcheck }) defer stop()