Emit closed event in web socket server