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-dms3
Commits
7077d717
Commit
7077d717
authored
Jul 10, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1464 from ipfs/fix/filters-offline
error out swarm filter when no daemon is online
parents
d4656657
e8d825de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
core/commands/swarm.go
core/commands/swarm.go
+10
-0
No files found.
core/commands/swarm.go
View file @
7077d717
...
...
@@ -392,6 +392,11 @@ Filters default to those specified under the "Swarm.AddrFilters" config key.
return
}
if
n
.
PeerHost
==
nil
{
res
.
SetError
(
errNotOnline
,
cmds
.
ErrNormal
)
return
}
snet
,
ok
:=
n
.
PeerHost
.
Network
()
.
(
*
swarm
.
Network
)
if
!
ok
{
res
.
SetError
(
errors
.
New
(
"failed to cast network to swarm network"
),
cmds
.
ErrNormal
)
...
...
@@ -434,6 +439,11 @@ add your filters to the ipfs config file.
return
}
if
n
.
PeerHost
==
nil
{
res
.
SetError
(
errNotOnline
,
cmds
.
ErrNormal
)
return
}
snet
,
ok
:=
n
.
PeerHost
.
Network
()
.
(
*
swarm
.
Network
)
if
!
ok
{
res
.
SetError
(
errors
.
New
(
"failed to cast network to swarm network"
),
cmds
.
ErrNormal
)
...
...
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