The loop and deleteChild message should probably be done after the disconnecting client has been removed from <code>global.instances[ namespace ].clients</code>, so that we don't send an extra message to a client that isn't there anymore.