init event handler before use #18

Merged
sarah merged 2 commits from segfault into trunk 2021-08-24 19:17:16 +00:00
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"))