Disable Circuit Info for now
This commit is contained in:
parent
78fab87569
commit
b9d0a843fc
2
go.sum
2
go.sum
|
@ -4,8 +4,6 @@ git.openprivacy.ca/cwtch.im/tapir v0.5.2 h1:7qJlUGY8RZbI7905BzVEEVB0hxP2GzI3lGiP
|
|||
git.openprivacy.ca/cwtch.im/tapir v0.5.2/go.mod h1:vVEu3CbXdyeMI5s1RkbROe1TBboNroGyJfODw8Ujlo8=
|
||||
git.openprivacy.ca/openprivacy/bine v0.0.4 h1:CO7EkGyz+jegZ4ap8g5NWRuDHA/56KKvGySR6OBPW+c=
|
||||
git.openprivacy.ca/openprivacy/bine v0.0.4/go.mod h1:13ZqhKyqakDsN/ZkQkIGNULsmLyqtXc46XBcnuXm/mU=
|
||||
git.openprivacy.ca/openprivacy/connectivity v1.8.2 h1:uCFnrJXsTh3ne4GcgvamoxomQ6fMishD3C2nQGpgdMY=
|
||||
git.openprivacy.ca/openprivacy/connectivity v1.8.2/go.mod h1:UjQiGBnWbotmBzIw59B8H6efwDadjkKzm3RPT1UaIRw=
|
||||
git.openprivacy.ca/openprivacy/connectivity v1.8.3 h1:bWM8aQHqHIpobYQcLQ9OsNPoIl+H+4JFWbYGdG0nHlg=
|
||||
git.openprivacy.ca/openprivacy/connectivity v1.8.3/go.mod h1:UjQiGBnWbotmBzIw59B8H6efwDadjkKzm3RPT1UaIRw=
|
||||
git.openprivacy.ca/openprivacy/log v1.0.2/go.mod h1:gGYK8xHtndRLDymFtmjkG26GaMQNgyhioNS82m812Iw=
|
||||
|
|
|
@ -403,16 +403,24 @@ func (e *engine) peerAuthed(onion string) {
|
|||
e.authorizations.Store(onion, model.AuthUnknown)
|
||||
}
|
||||
|
||||
details, err := e.acn.GetInfo(onion)
|
||||
if err == nil {
|
||||
if hops, exists := details["circuit"]; exists {
|
||||
e.eventManager.Publish(event.NewEvent(event.ACNInfo, map[event.Field]string{
|
||||
event.Handle: onion,
|
||||
event.Key: "circuit",
|
||||
event.Data: hops,
|
||||
}))
|
||||
}
|
||||
}
|
||||
// FIXME: This call uses WAY too much memory, and was responsible for the vast majority
|
||||
// of allocations in the UI
|
||||
// This is because Bine ends up reading the entire response into memory and then passes that back
|
||||
// into Connectivity which eventually extracts just what it needs.
|
||||
// Ideally we would just read from the control stream directly into reusable buffers.
|
||||
|
||||
//details, err := e.acn.GetInfo(onion)
|
||||
//if err == nil {
|
||||
// if hops, exists := details["circuit"]; exists {
|
||||
// e.eventManager.Publish(event.NewEvent(event.ACNInfo, map[event.Field]string{
|
||||
// event.Handle: onion,
|
||||
// event.Key: "circuit",
|
||||
// event.Data: hops,
|
||||
// }))
|
||||
// }
|
||||
//} else {
|
||||
// log.Errorf("error getting info for onion %v", err)
|
||||
//}
|
||||
|
||||
e.eventManager.Publish(event.NewEvent(event.PeerStateChange, map[event.Field]string{
|
||||
event.RemotePeer: string(onion),
|
||||
|
|
Loading…
Reference in New Issue