You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/Internal/Processor.php
+9-9
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,9 @@ class Processor {
50
50
/** @var \Generator[] */
51
51
private$processors = [];
52
52
53
+
/** @var int */
53
54
private$protocol;
55
+
54
56
private$seqId = -1;
55
57
private$compressionId = -1;
56
58
@@ -60,11 +62,13 @@ class Processor {
60
62
private$authPluginDataLen;
61
63
private$query;
62
64
public$named = [];
65
+
63
66
/** @var callable|null */
64
67
private$parseCallback = null;
65
68
/** @var callable|null */
66
69
private$packetCallback = null;
67
70
71
+
/** @var \Amp\Promise|null */
68
72
private$pendingWrite;
69
73
70
74
/** @var \Amp\Mysql\ConnectionConfig */
@@ -139,15 +143,11 @@ public function isReady(): bool {
139
143
publicfunctiondelRef() {
140
144
if (!--$this->refcount) {
141
145
$this->appendTask(function() {
142
-
$this->closeSocket();
146
+
$this->close();
143
147
});
144
148
}
145
149
}
146
150
147
-
publicfunctionforceClose() {
148
-
$this->closeSocket();
149
-
}
150
-
151
151
privatefunctionready() {
152
152
if (empty($this->deferreds)) {
153
153
if (empty($this->onReady)) {
@@ -445,7 +445,7 @@ private function handleError($packet) {
445
445
$this->ready();
446
446
} elseif ($this->connectionState < self::READY) {
447
447
// connection failure
448
-
$this->closeSocket();
448
+
$this->close();
449
449
$this->getDeferred()->fail(newInitializationException("Could not connect to {$this->config->resolvedHost}: {$this->connInfo->errorState}{$this->connInfo->errorMsg}"));
450
450
}
451
451
}
@@ -886,7 +886,7 @@ public function initClosing() {
886
886
$this->connectionState = self::CLOSING;
887
887
}
888
888
889
-
publicfunctioncloseSocket() {
889
+
publicfunctionclose() {
890
890
$this->connectionState = self::CLOSED;
891
891
if ($this->socket) {
892
892
$this->socket->close();
@@ -980,7 +980,7 @@ private function goneAway() {
980
980
$deferred->fail(newConnectionException("Connection went away... unable to fulfil this deferred ... It's unknown whether the query was executed...", $this->query));
981
981
}
982
982
}
983
-
$this->closeSocket();
983
+
$this->close();
984
984
}
985
985
986
986
/** @see 14.4 Compression */
@@ -1184,7 +1184,7 @@ private function sendHandshake($inSSL = false) {
0 commit comments