core: Fix build

This commit is contained in:
John Brooks 2016-10-16 15:50:59 -06:00
parent e9f22c64ac
commit 7c20d535c7
2 changed files with 3 additions and 23 deletions

View File

@ -13,9 +13,7 @@ type ContactList struct {
mutex sync.RWMutex
events *utils.Publisher
contacts map[int]*Contact
outboundRequests map[int]*OutboundContactRequest
inboundRequests map[int]*InboundContactRequest
contacts map[int]*Contact
}
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()

View File

@ -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