Merge pull request 'init event handler before use' (#18) from segfault into trunk
continuous-integration/drone/push Build is passing Details

Reviewed-on: #18
Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
This commit is contained in:
Sarah Jamie Lewis 2021-08-24 19:17:16 +00:00
commit 23c15130c7
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"))