sometimes it crashes when trying to emit.  Not sure what's happening,
but I suspect a weird race condition whereby the global_connect value
gets de-allocated while in the for loop (since an 'emit' is called?).
Kludgey to wrap it in a try/catch, but we can get to it later.
formatting