Update Bot (j'ai plus le repo sur GitHub)

Qui c'est la conne qui a delete le repo sur GitHub? C'EST MOIIIII
This commit is contained in:
2026-02-09 14:36:26 +01:00
parent eab4419e12
commit ad2014b7b2
586 changed files with 58986 additions and 25205 deletions

View File

@@ -345,7 +345,9 @@ class BaseConnection extends EventEmitter {
});
const rejectUnauthorized = this.config.ssl.rejectUnauthorized;
const verifyIdentity = this.config.ssl.verifyIdentity;
const servername = this.config.host;
const servername = Net.isIP(this.config.host)
? undefined
: this.config.host;
let secureEstablished = false;
this.stream.removeAllListeners('data');
@@ -410,6 +412,37 @@ class BaseConnection extends EventEmitter {
this.emit('error', err);
}
get state() {
// Error state has highest priority
if (this._fatalError || this._protocolError) {
return 'error';
}
// Closing state has second priority
if (this._closing || (this.stream && this.stream.destroyed)) {
return 'disconnected';
}
// Authenticated state has third priority
if (this.authorized) {
return 'authenticated';
}
// Connected state: handshake completed but not yet authorized
// This matches the original mysql driver's 'connected' state
if (this._handshakePacket) {
return 'connected';
}
// Protocol handshake state: connection established, handshake in progress
if (this.stream && !this.stream.destroyed) {
return 'protocol_handshake';
}
// Default: not connected
return 'disconnected';
}
get fatalError() {
return this._fatalError;
}