core: Fix build
This commit is contained in:
parent
e9f22c64ac
commit
7c20d535c7
|
@ -14,8 +14,6 @@ type ContactList struct {
|
|||
events *utils.Publisher
|
||||
|
||||
contacts map[int]*Contact
|
||||
outboundRequests map[int]*OutboundContactRequest
|
||||
inboundRequests map[int]*InboundContactRequest
|
||||
}
|
||||
|
||||
func LoadContactList(core *Ricochet) (*ContactList, error) {
|
||||
|
@ -61,26 +59,6 @@ func (this *ContactList) Contacts() []*Contact {
|
|||
return re
|
||||
}
|
||||
|
||||
func (this *ContactList) OutboundRequests() []*OutboundContactRequest {
|
||||
this.mutex.RLock()
|
||||
defer this.mutex.RUnlock()
|
||||
re := make([]*OutboundContactRequest, 0, len(this.outboundRequests))
|
||||
for _, request := range this.outboundRequests {
|
||||
re = append(re, request)
|
||||
}
|
||||
return re
|
||||
}
|
||||
|
||||
func (this *ContactList) InboundRequests() []*InboundContactRequest {
|
||||
this.mutex.RLock()
|
||||
defer this.mutex.RUnlock()
|
||||
re := make([]*InboundContactRequest, 0, len(this.inboundRequests))
|
||||
for _, request := range this.inboundRequests {
|
||||
re = append(re, request)
|
||||
}
|
||||
return re
|
||||
}
|
||||
|
||||
func (this *ContactList) ContactById(id int) *Contact {
|
||||
this.mutex.RLock()
|
||||
defer this.mutex.RUnlock()
|
||||
|
|
|
@ -50,6 +50,8 @@ func (oc *OnionConnector) Connect(address string, c context.Context) (net.Conn,
|
|||
for {
|
||||
// XXX This waits to know SOCKS info, but does not wait for connection
|
||||
// ready state; should it?
|
||||
// XXX Also, we're supposed to change backoff when tor connectivity state
|
||||
// changes, but this won't.
|
||||
proxy, err := oc.Network.WaitForProxyDialer(options, c)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue