only receive if listening
This commit is contained in:
@@ -80,7 +80,8 @@ public class ApiServer(string apiUrl) : IApiServer
|
|||||||
|
|
||||||
protected void Receive()
|
protected void Receive()
|
||||||
{
|
{
|
||||||
httpListener?.BeginGetContext(ListenerCallback, null);
|
if (httpListener.IsListening)
|
||||||
|
httpListener?.BeginGetContext(ListenerCallback, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ListenerCallback(IAsyncResult result)
|
protected void ListenerCallback(IAsyncResult result)
|
||||||
|
|||||||
Reference in New Issue
Block a user