forked from cwtch.im/libcwtch-go
Merge pull request 'init event handler before use' (#18) from segfault into trunk
Reviewed-on: cwtch.im/libcwtch-go#18 Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
This commit is contained in:
commit
23c15130c7
6
lib.go
6
lib.go
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue