Skip to content

Commit

Permalink
Avoid generating the maindom hash twice to get the Id.
Browse files Browse the repository at this point in the history
  • Loading branch information
nzdev authored and nul800sebastiaan committed Aug 30, 2021
1 parent b1d1a2f commit 20eda44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Umbraco.Core/Runtime/MainDomSemaphoreLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ internal class MainDomSemaphoreLock : IMainDomLock

public MainDomSemaphoreLock(ILogger logger)
{
var lockName = "UMBRACO-" + MainDom.GetMainDomId() + "-MAINDOM-LCK";
var mainDomId = MainDom.GetMainDomId();
var lockName = "UMBRACO-" + mainDomId + "-MAINDOM-LCK";
_systemLock = new SystemLock(lockName);

var eventName = "UMBRACO-" + MainDom.GetMainDomId() + "-MAINDOM-EVT";
var eventName = "UMBRACO-" + mainDomId + "-MAINDOM-EVT";
_signal = new EventWaitHandle(false, EventResetMode.AutoReset, eventName);
_logger = logger;
}
Expand Down

0 comments on commit 20eda44

Please sign in to comment.