Skip to content

Commit f2bcbe0

Browse files
committed
Removed static
1 parent 4810ad4 commit f2bcbe0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ServiceControl.RavenDB/EmbeddedDatabase.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)