(trunk libT) ensure that the last few log messages actually get logged before shutdown finishes.

This commit is contained in:
Jordan Lee
2011-02-20 19:12:45 +00:00
parent 9d805527e3
commit 779f52069a
+7 -6
View File
@@ -539,6 +539,13 @@ main( int argc, char ** argv )
pumpLogMessages( logfile );
}
printf( "Closing transmission session..." );
tr_sessionSaveSettings( mySession, configDir, &settings );
dtr_watchdir_free( watchdir );
tr_sessionClose( mySession );
pumpLogMessages( logfile );
printf( " done.\n" );
/* shutdown */
#if HAVE_SYSLOG
if( !foreground )
@@ -548,12 +555,6 @@ main( int argc, char ** argv )
}
#endif
printf( "Closing transmission session..." );
tr_sessionSaveSettings( mySession, configDir, &settings );
dtr_watchdir_free( watchdir );
tr_sessionClose( mySession );
printf( " done.\n" );
/* cleanup */
if( pidfile_created )
remove( pid_filename );