good morning!!!!

Skip to content
Snippets Groups Projects
Commit 8068a1be authored by alex.sharov's avatar alex.sharov
Browse files

save

parent dcabe33f
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,7 @@ func Downloader(ctx context.Context, cmd *cobra.Command) error {
if err = downloader.CreateTorrentFilesAndAdd(ctx, snapshotDir, protocols.TorrentClient); err != nil {
return fmt.Errorf("CreateTorrentFilesAndAdd: %w", err)
}
defer protocols.Close()
go downloader.LoggingLoop(ctx, protocols.TorrentClient)
......@@ -146,8 +147,9 @@ func Downloader(ctx context.Context, cmd *cobra.Command) error {
if err != nil {
return err
}
<-cmd.Context().Done()
grpcServer.GracefulStop()
defer grpcServer.GracefulStop()
<-ctx.Done()
return nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment