torrent fix
This commit is contained in:
parent
57ada71d36
commit
e517332a65
26 changed files with 2240 additions and 850 deletions
cmd/tstor
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
|
||||
|
@ -75,7 +76,6 @@ func run(configPath string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer client.Shutdown(ctx)
|
||||
|
||||
log := rlog.Component("run")
|
||||
|
@ -187,7 +187,7 @@ func run(configPath string) error {
|
|||
go func() {
|
||||
logFilename := filepath.Join(conf.Log.Path, "logs")
|
||||
|
||||
err := delivery.New(nil, tsrv, sfs, logFilename, conf)
|
||||
err := delivery.Run(tsrv, sfs, logFilename, conf)
|
||||
if err != nil {
|
||||
log.Error(ctx, "error initializing HTTP server", rlog.Error(err))
|
||||
}
|
||||
|
@ -197,5 +197,7 @@ func run(configPath string) error {
|
|||
signal.Notify(sigChan, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
|
||||
<-sigChan
|
||||
|
||||
return tsrv.Close(ctx)
|
||||
return errors.Join(
|
||||
tsrv.Close(ctx),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue