Index: binary-improvements2/MapRendering/Web/SSE/SseHandler.cs
===================================================================
--- binary-improvements2/MapRendering/Web/SSE/SseHandler.cs	(revision 374)
+++ binary-improvements2/MapRendering/Web/SSE/SseHandler.cs	(revision 382)
@@ -5,4 +5,6 @@
 using System.Threading;
 using AllocsFixes.NetConnections.Servers.Web.Handlers;
+using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest;
+using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse;
 
 // Implemented following HTML spec
@@ -10,7 +12,7 @@
 
 namespace AllocsFixes.NetConnections.Servers.Web.SSE {
-	public class SseHandler : PathHandler {
+	public class SseHandler : AbsHandler {
 		private readonly Dictionary<string, EventBase> events = new CaseInsensitiveStringDictionary<EventBase> ();
-		
+
 		private ThreadManager.ThreadInfo queueThead;
 		private readonly AutoResetEvent evSendRequest = new AutoResetEvent (false);
@@ -18,6 +20,6 @@
 
 		public SseHandler (string _moduleName = null) : base (_moduleName) {
-			Type[] ctorTypes = {typeof (SseHandler)};
-			object[] ctorParams = {this};
+			Type[] ctorTypes = { typeof (SseHandler) };
+			object[] ctorParams = { this };
 
 			foreach (Type t in Assembly.GetExecutingAssembly ().GetTypes ()) {
@@ -25,6 +27,6 @@
 					ConstructorInfo ctor = t.GetConstructor (ctorTypes);
 					if (ctor != null) {
-						EventBase apiInstance = (EventBase) ctor.Invoke (ctorParams);
-						addEvent (apiInstance.Name, apiInstance);
+						EventBase apiInstance = (EventBase)ctor.Invoke (ctorParams);
+						AddEvent (apiInstance.Name, apiInstance);
 					}
 				}
@@ -34,5 +36,5 @@
 		public override void SetBasePathAndParent (Web _parent, string _relativePath) {
 			base.SetBasePathAndParent (_parent, _relativePath);
-			
+
 			queueThead = ThreadManager.StartThread ("SSE-Processing_" + urlBasePath, QueueProcessThread, ThreadPriority.BelowNormal,
 				_useRealThread: true);
@@ -45,22 +47,22 @@
 		}
 
-		private void addEvent (string _eventName, EventBase _eventInstance) {
+		public void AddEvent (string _eventName, EventBase _eventInstance) {
 			events.Add (_eventName, _eventInstance);
 			WebPermissions.Instance.AddKnownModule ("webevent." + _eventName, _eventInstance.DefaultPermissionLevel ());
 		}
 
-		public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,
+		public override void HandleRequest (string _requestPath, HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _con,
 			int _permissionLevel) {
-			string eventName = _req.Url.AbsolutePath.Remove (0, urlBasePath.Length);
+			string eventName = _requestPath.Remove (0, urlBasePath.Length);
 
 			if (!events.TryGetValue (eventName, out EventBase eventInstance)) {
 				Log.Out ($"Error in {nameof (SseHandler)}.HandleRequest(): No handler found for event \"{eventName}\"");
-				_resp.StatusCode = (int) HttpStatusCode.NotFound;
+				_resp.StatusCode = (int)HttpStatusCode.NotFound;
 				return;
 			}
 
-			if (!AuthorizeForEvent (eventName, _permissionLevel)) {
-				_resp.StatusCode = (int) HttpStatusCode.Forbidden;
-				if (_user != null) {
+			if (!IsAuthorizedForEvent (eventName, _permissionLevel)) {
+				_resp.StatusCode = (int)HttpStatusCode.Forbidden;
+				if (_con != null) {
 					//Log.Out ($"{nameof(SseHandler)}: user '{user.SteamID}' not allowed to access '{eventName}'");
 				}
@@ -80,24 +82,24 @@
 				Log.Error ($"Error in {nameof (SseHandler)}.HandleRequest(): Handler {eventInstance.Name} threw an exception:");
 				Log.Exception (e);
-				_resp.StatusCode = (int) HttpStatusCode.InternalServerError;
+				_resp.StatusCode = (int)HttpStatusCode.InternalServerError;
 			}
 		}
 
-		private bool AuthorizeForEvent (string _eventName, int _permissionLevel) {
+		private bool IsAuthorizedForEvent (string _eventName, int _permissionLevel) {
 			return WebPermissions.Instance.ModuleAllowedWithLevel ("webevent." + _eventName, _permissionLevel);
 		}
 
 		private void QueueProcessThread (ThreadManager.ThreadInfo _threadInfo) {
-			try {
-				while (!shutdown && !_threadInfo.TerminationRequested ()) {
-					evSendRequest.WaitOne (500);
+			while (!shutdown && !_threadInfo.TerminationRequested ()) {
+				evSendRequest.WaitOne (500);
 
-					foreach (KeyValuePair<string, EventBase> kvp in events) {
+				foreach (KeyValuePair<string, EventBase> kvp in events) {
+					try {
 						kvp.Value.ProcessSendQueue ();
+					} catch (Exception e) {
+						Log.Error ($"SSE ({kvp.Key}): Error processing send queue");
+						Log.Exception (e);
 					}
 				}
-			} catch (Exception e) {
-				Log.Error ("SSE: Error processing send queue");
-				Log.Exception (e);
 			}
 		}
