Skip to content

Commit 4a3152e

Browse files
authored
Merge pull request #16 from ahwm/develop
Fix for #15
2 parents a67d35a + 50d741e commit 4a3152e

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

src/SvnManager.WebUI/Bootstrapper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ void OnConfigurationBuilder(NancyInternalConfiguration x)
5858
protected override void ConfigureApplicationContainer(TinyIoCContainer container)
5959
{
6060
base.ConfigureApplicationContainer(container);
61-
ResourceViewLocationProvider.RootNamespaces.Add(Assembly.GetAssembly(typeof(RepositoriesModule)), "SvnManager.WebUI.Views");
61+
if (!ResourceViewLocationProvider.RootNamespaces.ContainsKey(Assembly.GetAssembly(typeof(RepositoriesModule))))
62+
ResourceViewLocationProvider.RootNamespaces.Add(Assembly.GetAssembly(typeof(RepositoriesModule)), "SvnManager.WebUI.Views");
6263
}
6364
}
6465
}

src/SvnManager.WebUI/NancyHostControl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public void Stop()
2525
public void Dispose()
2626
{
2727
_host.Stop();
28+
_host.Dispose();
2829
}
2930
}
3031
}

src/SvnManager/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.*")]
36-
//[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

src/SvnManager/SvnManagerService.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ protected override void OnStart(string[] args)
4545
private void Monitor_Reloaded(object sender, EventArgs e)
4646
{
4747
EventLog.WriteEntry(Source, "Configuration Reloaded", EventLogEntryType.Information);
48-
host.Stop();
49-
host = new NancyHostControl(InterfaceUrlHost, InterfaceUrlPort, InterfaceUrlHttps);
50-
host.Start();
48+
host.Dispose();
49+
try
50+
{
51+
host = new NancyHostControl(InterfaceUrlHost, InterfaceUrlPort, InterfaceUrlHttps);
52+
host.Start();
53+
}
54+
catch (Exception ex)
55+
{
56+
EventLog.WriteEntry(Source, ex.Message + "\r\n\r\n" + ex.StackTrace, EventLogEntryType.Error);
57+
}
5158
}
5259

5360
private void _worker_DoWork(object sender, DoWorkEventArgs e)
@@ -72,7 +79,7 @@ private void _backupTimer_Elapsed(object sender, ElapsedEventArgs e)
7279

7380
protected override void OnStop()
7481
{
75-
host.Stop();
82+
host.Dispose();
7683
}
7784
}
7885
}

0 commit comments

Comments
 (0)