Last active
January 28, 2018 08:17
-
-
Save salrashid123/ef811e28e18650ff1b0f128ed5405e8a to your computer and use it in GitHub Desktop.
Program.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.UseKestrel(options => | |
{ | |
try | |
{ | |
for (int i = 0; i < args.Length; i++) | |
{ | |
string value = args[i]; | |
if (value == "--fds") | |
{ | |
var fds = args[i+1].Split(",")[0]; | |
string env_var = Environment.GetEnvironmentVariable("LD_LIBRARY_PATH"); | |
logger.LogDebug("Using LD_LIBRARY_PATH: " + env_var); | |
logger.LogDebug("Setting kestrel ListenHandler to fd >>>>>>>> " + fds); | |
ulong fd = Convert.ToUInt64(fds); | |
options.ListenHandle(fd); | |
break; | |
} | |
} | |
} | |
catch (System.IndexOutOfRangeException e) | |
{ | |
logger.LogError("Provided filedescriptor argument but unable to parse descriptor list " + e); | |
} | |
catch (Exception ex) { | |
logger.LogCritical(ex.Message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment