Skip to content

Commit ec02cfe

Browse files
committed
Make StartUp do nothing if we're already running.
1 parent a4e61b1 commit ec02cfe

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

uhttpsharp/HttpServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ private HttpServer()
4646

4747
public void StartUp()
4848
{
49+
if (_isActive)
50+
return;
4951
_listener = new TcpListener(IPAddress.Loopback, Port);
5052
_listener.Start();
5153
var serverThread = new Thread(Listen) {IsBackground = true};

0 commit comments

Comments
 (0)