@@ -53,7 +53,7 @@ public static EmbeddedDatabase Start(EmbeddedDatabaseConfiguration databaseConfi
5353 var nugetPackagesPath = Path . Combine ( databaseConfiguration . DbPath , "Packages" , "NuGet" ) ;
5454
5555 Logger . InfoFormat ( "Loading RavenDB license from {0}" , licenseFileNameAndServerDirectory . LicenseFileName ) ;
56- serverOptions = new ServerOptions
56+ var serverOptions = new ServerOptions
5757 {
5858 CommandLineArgs =
5959 [
@@ -85,6 +85,7 @@ public static EmbeddedDatabase Start(EmbeddedDatabaseConfiguration databaseConfi
8585
8686 void Start ( ServerOptions serverOptions )
8787 {
88+ this . serverOptions = serverOptions ;
8889 EmbeddedServer . Instance . ServerProcessExited += OnServerProcessExited ;
8990 EmbeddedServer . Instance . StartServer ( serverOptions ) ;
9091
@@ -220,7 +221,7 @@ public void Dispose()
220221
221222 if ( EmbeddedServer . Instance != null )
222223 {
223- serverOptions . GracefulShutdownTimeout = TimeSpan . Zero ;
224+ serverOptions ! . GracefulShutdownTimeout = TimeSpan . Zero ;
224225 Logger . Debug ( "Disposing RavenDB server" ) ;
225226 EmbeddedServer . Instance . Dispose ( ) ;
226227 Logger . Debug ( "Disposed RavenDB server" ) ;
@@ -309,7 +310,7 @@ static long DirSize(DirectoryInfo d)
309310 readonly EmbeddedDatabaseConfiguration configuration ;
310311 readonly CancellationToken shutdownCancellationToken ;
311312 readonly CancellationTokenRegistration applicationStoppingRegistration ;
312- static ServerOptions serverOptions ;
313+ ServerOptions ? serverOptions ;
313314
314315 static TimeSpan delayBetweenRestarts = TimeSpan . FromSeconds ( 60 ) ;
315316 static readonly ILog Logger = LogManager . GetLogger < EmbeddedDatabase > ( ) ;
0 commit comments