diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/server.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/server.c b/src/server/server.c index e2314a2..71b791a 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -308,10 +308,14 @@ int main(int argc, char *argv[]) logadd( LOG_INFO, "Loading images...." ); // Load all images in base path if ( !image_loadAll( NULL ) || _shutdown ) { - logadd( LOG_ERROR, "Could not load images." ); + if ( _shutdown ) { + logadd( LOG_ERROR, "Received shutdown request while loading images." ); + } else { + logadd( LOG_ERROR, "Could not load images." ); + } free( bindAddress ); dnbd3_cleanup(); - return 0; + return _shutdown ? 0 : 1; } // Give other threads some time to start up before accepting connections |