private void Process() { while (_httpListener != null && _httpListener.IsListening) { try { HttpListenerContext request = _httpListener.GetContext(); var h = new CMHttpHandler(request, _handler); var t = new Thread(h.ProcessRequest); t.Start(); } catch (HttpListenerException) { // TODO LOG } catch (InvalidOperationException) { // TODO LOG } } }