Skip to content

Commit

Permalink
Merge branch 'develop2'
Browse files Browse the repository at this point in the history
  • Loading branch information
yar229 committed Feb 21, 2018
2 parents 84c49dc + 11c6278 commit 900dfcb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
4 changes: 2 additions & 2 deletions MailRuCloud/MailRuCloudApi/MailRuCloudApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
<RootNamespace>YaR.MailRuCloud.Api</RootNamespace>
<AssemblyName>MailRuCloud.Api</AssemblyName>
<AssemblyVersion>1.10.1.10</AssemblyVersion>
<FileVersion>1.10.1.10</FileVersion>
<AssemblyVersion>1.10.1.11</AssemblyVersion>
<FileVersion>1.10.1.11</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
35 changes: 20 additions & 15 deletions WDMRC.Console/Payload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,26 @@ public static void Run(CommandLineOptions options)

var httpListener = new HttpListener();
var httpListenerOptions = new HttpListenerOptions(options);
try
{
foreach (var prefix in httpListenerOptions.Prefixes)
httpListener.Prefixes.Add(prefix);
httpListener.AuthenticationSchemes = httpListenerOptions.AuthenticationScheme;
httpListener.Start();

Logger.Info($"WebDAV server running at {httpListenerOptions.Prefixes.Aggregate((current, next) => current + ", " + next)}");

// Start dispatching requests
var t = DispatchHttpRequestsAsync(httpListener, options.MaxThreadCount);
t.Wait(CancelToken.Token);

//do not use console input - it uses 100% CPU when running mono-service in ubuntu
}
try
{
foreach (var prefix in httpListenerOptions.Prefixes)
httpListener.Prefixes.Add(prefix);
httpListener.AuthenticationSchemes = httpListenerOptions.AuthenticationScheme;
httpListener.Start();

Logger.Info(
$"WebDAV server running at {httpListenerOptions.Prefixes.Aggregate((current, next) => current + ", " + next)}");

// Start dispatching requests
var t = DispatchHttpRequestsAsync(httpListener, options.MaxThreadCount);
t.Wait(CancelToken.Token);

//do not use console input - it uses 100% CPU when running mono-service in ubuntu
}
catch (OperationCanceledException ce) when (ce.CancellationToken.IsCancellationRequested)
{
Logger.Info("Cancelled");
}
finally
{
httpListener.Stop();
Expand Down
4 changes: 2 additions & 2 deletions WDMRC.Console/WDMRC.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<Copyright>[email protected]</Copyright>
<Description>WebDAV emulator for Cloud.mail.ru</Description>
<PackageId>WebDAVCloudMailRu</PackageId>
<AssemblyVersion>1.10.1.10</AssemblyVersion>
<FileVersion>1.10.1.10</FileVersion>
<AssemblyVersion>1.10.1.11</AssemblyVersion>
<FileVersion>1.10.1.11</FileVersion>
<AssemblyName>wdmrc</AssemblyName>
<RootNamespace>YaR.CloudMailRu.Console</RootNamespace>
<StartupObject></StartupObject>
Expand Down

0 comments on commit 900dfcb

Please sign in to comment.