Don't block the proc
This commit is contained in:
parent
e0cf18299a
commit
3459c25be0
|
@ -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()
|
||||||
|
|
||||||
|
go func() {
|
||||||
// Run the SFTP server.
|
// Run the SFTP server.
|
||||||
if err := sftp.New().Run(); err != nil {
|
if err := sftp.New().Run(); err != nil {
|
||||||
log.WithError(err).Fatal("failed to initialize the sftp server")
|
log.WithError(err).Fatal("failed to initialize the sftp server")
|
||||||
return
|
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