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
9b0c578f
Commit
9b0c578f
authored
Sep 27, 2014
by
Jeromy
Committed by
Juan Batiz-Benet
Oct 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better cleanup of ipfs on program exit
parent
ed2fbd05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
cmd/ipfs/mount_unix.go
cmd/ipfs/mount_unix.go
+8
-1
daemon/daemon_client.go
daemon/daemon_client.go
+1
-1
No files found.
cmd/ipfs/mount_unix.go
View file @
9b0c578f
...
...
@@ -72,15 +72,22 @@ func mountCmd(c *commander.Command, inp []string) error {
mp
:=
inp
[
0
]
fmt
.
Printf
(
"Mounting at %s
\n
"
,
mp
)
var
ipnsDone
chan
struct
{}
ns
,
ok
:=
c
.
Flag
.
Lookup
(
"n"
)
.
Value
.
Get
()
.
(
string
)
if
ok
{
ipnsDone
=
make
(
chan
struct
{})
go
func
()
{
err
=
ipns
.
Mount
(
n
,
ns
,
mp
)
if
err
!=
nil
{
fmt
.
Printf
(
"Error mounting ipns: %s
\n
"
,
err
)
}
ipnsDone
<-
struct
{}{}
}()
}
return
rofs
.
Mount
(
n
,
mp
)
err
=
rofs
.
Mount
(
n
,
mp
)
if
ipnsDone
!=
nil
{
<-
ipnsDone
}
return
err
}
daemon/daemon_client.go
View file @
9b0c578f
...
...
@@ -60,7 +60,7 @@ func SendCommand(command *Command, confdir string) error {
return
ErrDaemonNotRunning
}
log
.
Info
(
"Daemon is running! %s"
,
err
)
log
.
Info
(
"Daemon is running!
[reason =
%s
]
"
,
err
)
server
,
err
:=
getDaemonAddr
(
confdir
)
if
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