mirror of
https://github.com/Jackett/Jackett
synced 2025-01-31 20:02:08 +00:00
Fixed mono bug with httplistener
This commit is contained in:
parent
976f42b48c
commit
8e475e1681
1 changed files with 6 additions and 3 deletions
|
@ -52,17 +52,20 @@ namespace Jackett
|
|||
|
||||
public async Task Start()
|
||||
{
|
||||
Program.LoggerInstance.Info("Starting HTTP server...");
|
||||
Program.LoggerInstance.Info("Starting HTTP server on port " + Port + " listening " + (ListenPublic ? "publicly" : "privately"));
|
||||
|
||||
try
|
||||
{
|
||||
listener = new HttpListener();
|
||||
listener.Prefixes.Add(string.Format("http://127.0.0.1:{0}/", Port));
|
||||
listener.Prefixes.Add(string.Format("http://localhost:{0}/", Port));
|
||||
|
||||
if (ListenPublic)
|
||||
{
|
||||
listener.Prefixes.Add(string.Format("http://*:{0}/", Port));
|
||||
}
|
||||
else
|
||||
{
|
||||
listener.Prefixes.Add(string.Format("http://127.0.0.1:{0}/", Port));
|
||||
}
|
||||
|
||||
listener.Start();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue