init event handler before use
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Dan Ballard 2021-08-24 08:47:31 -07:00
parent bda19b3197
commit 73c57c60f2
1 changed files with 3 additions and 3 deletions

6
lib.go
View File

@ -109,6 +109,9 @@ func _startCwtch(appDir string, torPath string) {
return
}
log.Infof("Creating new EventHandler()")
eventHandler = utils.NewEventHandler()
// Exclude Tapir wire Messages
//(We need a TRACE level)
log.ExcludeFromPattern("service.go")
@ -144,9 +147,6 @@ func _startCwtch(appDir string, torPath string) {
panic(err)
}
log.Infof("Creating new EventHandler()")
eventHandler = utils.NewEventHandler()
log.Infof("making directory %v", appDir)
os.MkdirAll(path.Join(appDir, "tor"), 0700)
tor.NewTorrc().WithSocksPort(port).WithOnionTrafficOnly().WithControlPort(controlPort).WithHashedPassword(base64.StdEncoding.EncodeToString(key)).Build(filepath.Join(appDir, "tor", "torrc"))