Fix event handler bug and add server-side publish validation
Fix EventSource issues related to synchronous purging of disconnected client sockets