fix with defers on failure with tor
This commit is contained in:
parent
d05d283354
commit
961f83badb
@ -45,12 +45,13 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tr, dialer, dialerctx, err := network.InitTorSession()
|
tr, dialer, dialerctx, err := network.InitTorSession()
|
||||||
|
defer dialerctx()
|
||||||
|
defer tr.Close()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer dialerctx()
|
|
||||||
defer tr.Close()
|
|
||||||
|
|
||||||
cr, err = coronafana.GetData(cfg, dialer)
|
cr, err = coronafana.GetData(cfg, dialer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user