             cb      : (err, resp) =>
                 if err
                     cb?(err)
+                    cb = undefined
                     return
 
                 if @_state == 'closed'
                     # already closed so ignore anything else.
                     cb?('closed')
+                    cb = undefined
                     return
 
                 if first_resp

                        @_update_all(resp.query[@_table])
                        @emit("connected", resp.query[@_table])  # ready to use!
                        cb?()
                        # Do any pending saves
                        for cb in @_connected_save_cbs ? []
                            @save(cb)
                        delete @_connected_save_cbs
                else
                    if @_state != 'connected'

                    first_resp = false
                    if @_state == 'closed'
                        cb?("closed")
                        cb = undefined
                    else if resp?.event == 'query_cancel'
                        cb?("query-cancel")
                        cb = undefined
                    else if err
                        cb?(err)
                        cb = undefined
                    else if not resp?.query?[@_table]?
                        cb?("got no data")
                        cb = undefined
                    else
                        # Successfully completed query
                        this_query_id = @_id = resp.id
