defer fuse.Unmount(args.MountDir)
// TODO: Think about the ramifications of exiting not due to a signal.
defer conn.Close()
- client, err := torrent.NewClient(&torrent.Config{
+ cfg := torrent.Config{
DataDir: args.DownloadDir,
DisableTrackers: args.DisableTrackers,
- ListenAddr: args.ListenAddr.String(),
NoUpload: true, // Ensure that downloads are responsive.
- })
+ }
+ cfg.SetListenAddr(args.ListenAddr.String())
+ client, err := torrent.NewClient(&cfg)
if err != nil {
log.Print(err)
return 1