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
p2p
go-p2p-swarm
Commits
1b9cb346
Commit
1b9cb346
authored
Jul 23, 2016
by
John Steidley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gosimple
parent
4509f045
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dial_test.go
dial_test.go
+2
-2
swarm_net.go
swarm_net.go
+1
-1
No files found.
dial_test.go
View file @
1b9cb346
...
...
@@ -187,7 +187,7 @@ func TestDialWait(t *testing.T) {
}
else
{
t
.
Log
(
"correctly got error:"
,
err
)
}
duration
:=
time
.
Now
()
.
Sub
(
before
)
duration
:=
time
.
Since
(
before
)
dt
:=
s1
.
dialT
if
duration
<
dt
*
dialAttempts
{
...
...
@@ -451,7 +451,7 @@ func TestDialBackoffClears(t *testing.T) {
}
else
{
t
.
Log
(
"correctly got error:"
,
err
)
}
duration
:=
time
.
Now
()
.
Sub
(
before
)
duration
:=
time
.
Since
(
before
)
dt
:=
s1
.
dialT
if
duration
<
dt
*
dialAttempts
{
...
...
swarm_net.go
View file @
1b9cb346
...
...
@@ -124,7 +124,7 @@ func (n *Network) InterfaceListenAddresses() ([]ma.Multiaddr, error) {
// For now only returns Connected || NotConnected. Expand into more later.
func
(
n
*
Network
)
Connectedness
(
p
peer
.
ID
)
inet
.
Connectedness
{
c
:=
n
.
Swarm
()
.
ConnectionsToPeer
(
p
)
if
c
!=
nil
&&
len
(
c
)
>
0
{
if
len
(
c
)
>
0
{
return
inet
.
Connected
}
return
inet
.
NotConnected
...
...
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