Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-bitswap
Commits
05c10446
Commit
05c10446
authored
Dec 23, 2014
by
Brian Tiger Chow
Committed by
Juan Batiz-Benet
Dec 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(bitswap) always dial
parent
847826d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
bitswap.go
bitswap.go
+8
-2
No files found.
bitswap.go
View file @
05c10446
...
...
@@ -19,9 +19,10 @@ import (
wantlist
"github.com/jbenet/go-ipfs/exchange/bitswap/wantlist"
peer
"github.com/jbenet/go-ipfs/peer"
u
"github.com/jbenet/go-ipfs/util"
errors
"github.com/jbenet/go-ipfs/util/debugerror"
"github.com/jbenet/go-ipfs/util/delay"
eventlog
"github.com/jbenet/go-ipfs/util/eventlog"
pset
"github.com/jbenet/go-ipfs/util/peerset"
pset
"github.com/jbenet/go-ipfs/util/peerset"
// TODO move this to peerstore
)
var
log
=
eventlog
.
Logger
(
"bitswap"
)
...
...
@@ -352,8 +353,13 @@ func (bs *bitswap) ReceiveError(err error) {
// send strives to ensure that accounting is always performed when a message is
// sent
func
(
bs
*
bitswap
)
send
(
ctx
context
.
Context
,
p
peer
.
ID
,
m
bsmsg
.
BitSwapMessage
)
error
{
log
.
Event
(
ctx
,
"DialPeer"
,
p
)
err
:=
bs
.
sender
.
DialPeer
(
ctx
,
p
)
if
err
!=
nil
{
return
errors
.
Wrap
(
err
)
}
if
err
:=
bs
.
sender
.
SendMessage
(
ctx
,
p
,
m
);
err
!=
nil
{
return
err
return
err
ors
.
Wrap
(
err
)
}
return
bs
.
engine
.
MessageSent
(
p
,
m
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment