@@ -157,7 +157,7 @@ Protocol.prototype._enqueue = function(sequence) {
157157 self . _emitPacket ( packet ) ;
158158 } )
159159 . on ( 'timeout' , function ( ) {
160- var err = new Error ( sequence . constructor . name + ' inactivity timeout' ) ;
160+ var err = new Error ( sequence . id + ' inactivity timeout' ) ;
161161
162162 err . code = 'PROTOCOL_SEQUENCE_TIMEOUT' ;
163163 err . fatal = true ;
@@ -206,7 +206,7 @@ Protocol.prototype._enqueue = function(sequence) {
206206
207207Protocol . prototype . _validateEnqueue = function _validateEnqueue ( sequence ) {
208208 var err ;
209- var prefix = 'Cannot enqueue ' + sequence . constructor . name ;
209+ var prefix = 'Cannot enqueue ' + sequence . id ;
210210
211211 if ( this . _fatalError ) {
212212 err = new Error ( prefix + ' after fatal error.' ) ;
@@ -253,7 +253,7 @@ Protocol.prototype._parsePacket = function() {
253253
254254 var Packet = this . _determinePacket ( sequence ) ;
255255 var packet = new Packet ( { protocol41 : this . _config . protocol41 } ) ;
256- var packetName = Packet . name ;
256+ var packetName = packet . id ;
257257
258258 // Special case: Faster dispatch, and parsing done inside sequence
259259 if ( Packet === Packets . RowDataPacket ) {
@@ -447,7 +447,7 @@ Protocol.prototype._debugPacket = function(incoming, packet) {
447447 var direction = incoming
448448 ? '<--'
449449 : '-->' ;
450- var packetName = packet . constructor . name ;
450+ var packetName = packet . id ;
451451 var threadId = connection && connection . threadId !== null
452452 ? ' (' + connection . threadId + ')'
453453 : '' ;
0 commit comments