mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Fixed mono bug with httplistener
This commit is contained in:
@@ -52,17 +52,20 @@ namespace Jackett
|
|||||||
|
|
||||||
public async Task Start()
|
public async Task Start()
|
||||||
{
|
{
|
||||||
Program.LoggerInstance.Info("Starting HTTP server...");
|
Program.LoggerInstance.Info("Starting HTTP server on port " + Port + " listening " + (ListenPublic ? "publicly" : "privately"));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
listener = new HttpListener();
|
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)
|
if (ListenPublic)
|
||||||
{
|
{
|
||||||
listener.Prefixes.Add(string.Format("http://*:{0}/", Port));
|
listener.Prefixes.Add(string.Format("http://*:{0}/", Port));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
listener.Prefixes.Add(string.Format("http://127.0.0.1:{0}/", Port));
|
||||||
|
}
|
||||||
|
|
||||||
listener.Start();
|
listener.Start();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user