                     // if the server is processing messages in a sensible manner) that we will
                     // ignore it for now.
                     _currentQueryHandler.handleData(_currResults, serverParams);
-                    _currResults = [];
                 } catch (e:CodecError) {
                      onCodecError(e);
                 }
+                _currResults = [];
             }
         }
 

            if (_currentQueryHandler) {
                flushPendingResults();
                _currentQueryHandler.handleCompletion(msg.command, msg.affectedRows, msg.oid);
                _currentQueryHandler.dispose();
                _currentQueryHandler = null;
            } else if (_hasCodecError) {
                _hasCodecError = false;
            } else {

            // to handle this differently, but there's little practical use for that.
            if (_currentQueryHandler) {
                _currentQueryHandler.handleCompletion('EMPTY QUERY');
            } else {
                onProtocolError(new ProtocolError("Unexpected EmptyQueryResponse"));
            }
