Don't block the proc
This commit is contained in:
parent
e0cf18299a
commit
3459c25be0
12
cmd/root.go
12
cmd/root.go
|
@ -272,11 +272,13 @@ func rootCmdRun(cmd *cobra.Command, _ []string) {
|
||||||
// Wait until all of the servers are ready to go before we fire up the SFTP and HTTP servers.
|
// Wait until all of the servers are ready to go before we fire up the SFTP and HTTP servers.
|
||||||
pool.StopWait()
|
pool.StopWait()
|
||||||
|
|
||||||
// Run the SFTP server.
|
go func() {
|
||||||
if err := sftp.New().Run(); err != nil {
|
// Run the SFTP server.
|
||||||
log.WithError(err).Fatal("failed to initialize the sftp server")
|
if err := sftp.New().Run(); err != nil {
|
||||||
return
|
log.WithError(err).Fatal("failed to initialize the sftp server")
|
||||||
}
|
return
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// Ensure the archive directory exists.
|
// Ensure the archive directory exists.
|
||||||
if err := os.MkdirAll(c.System.ArchiveDirectory, 0755); err != nil {
|
if err := os.MkdirAll(c.System.ArchiveDirectory, 0755); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user