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-unixfs
Commits
19c2c655
Commit
19c2c655
authored
Jan 17, 2015
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(core) don't assume Repo won't be nil
parent
de452778
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
core/core.go
core/core.go
+4
-3
No files found.
core/core.go
View file @
19c2c655
...
...
@@ -265,9 +265,9 @@ func (n *IpfsNode) StartOnlineServices(ctx context.Context) error {
// teardown closes children
func
(
n
*
IpfsNode
)
teardown
()
error
{
var
er
r
s
[]
erro
r
closers
:=
[]
io
.
Closer
{
n
.
Repo
,
var
clos
ers
[]
io
.
Close
r
if
n
.
Repo
!=
nil
{
closers
=
append
(
closers
,
n
.
Repo
)
}
if
n
.
DHT
!=
nil
{
closers
=
append
(
closers
,
n
.
DHT
)
...
...
@@ -275,6 +275,7 @@ func (n *IpfsNode) teardown() error {
if
n
.
PeerHost
!=
nil
{
closers
=
append
(
closers
,
n
.
PeerHost
)
}
var
errs
[]
error
for
_
,
closer
:=
range
closers
{
if
closer
!=
nil
{
if
err
:=
closer
.
Close
();
err
!=
nil
{
...
...
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