Don't block the proc

This commit is contained in:
Dane Everitt 2021-01-10 15:59:45 -08:00
parent e0cf18299a
commit 3459c25be0
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -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 {