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
33ba3f63
Commit
33ba3f63
authored
Nov 11, 2014
by
Brian Tiger Chow
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(mount_unix) return the errs in select
fix(mount_unix) rm extraneous error
parent
fed2f8d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
core/commands2/mount_unix.go
core/commands2/mount_unix.go
+4
-5
No files found.
core/commands2/mount_unix.go
View file @
33ba3f63
...
@@ -63,18 +63,17 @@ not be listable, as it is virtual. Accessing known paths directly.
...
@@ -63,18 +63,17 @@ not be listable, as it is virtual. Accessing known paths directly.
nsdone
:=
mountIpns
(
ctx
.
Node
,
nsdir
,
fsdir
)
nsdone
:=
mountIpns
(
ctx
.
Node
,
nsdir
,
fsdir
)
// wait until mounts return an error (or timeout if successful)
// wait until mounts return an error (or timeout if successful)
var
err
error
select
{
select
{
case
err
=
<-
fsdone
:
case
err
:=
<-
fsdone
:
case
err
=
<-
nsdone
:
return
nil
,
err
case
err
:=
<-
nsdone
:
return
nil
,
err
// mounted successfully, we timed out with no errors
// mounted successfully, we timed out with no errors
case
<-
time
.
After
(
mountTimeout
)
:
case
<-
time
.
After
(
mountTimeout
)
:
output
:=
ctx
.
Config
.
Mounts
output
:=
ctx
.
Config
.
Mounts
return
&
output
,
nil
return
&
output
,
nil
}
}
return
nil
,
err
},
},
Type
:
&
config
.
Mounts
{},
Type
:
&
config
.
Mounts
{},
Marshallers
:
map
[
cmds
.
EncodingType
]
cmds
.
Marshaller
{
Marshallers
:
map
[
cmds
.
EncodingType
]
cmds
.
Marshaller
{
...
...
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