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

                    // 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);
                }
            }
        }


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