mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 11:18:59 +01:00
Avoid issues while reconnecting
This commit is contained in:
parent
ba6c3850a5
commit
12363911d9
2
docs
2
docs
@ -1 +1 @@
|
||||
Subproject commit 0b0c17a38bf999b500d0865230d547e28b3aefa0
|
||||
Subproject commit 8c066db91f33b544e0822aeaae778989c0527d94
|
@ -589,6 +589,9 @@ class DataCenterConnection implements JsonSerializable
|
||||
*/
|
||||
public function reading(bool $reading, int $x)
|
||||
{
|
||||
if (!isset($this->availableConnections[$x])) {
|
||||
return;
|
||||
}
|
||||
$this->availableConnections[$x] += $reading ? -$this->decRead : $this->decRead;
|
||||
}
|
||||
/**
|
||||
@ -601,6 +604,9 @@ class DataCenterConnection implements JsonSerializable
|
||||
*/
|
||||
public function writing(bool $writing, int $x)
|
||||
{
|
||||
if (!isset($this->availableConnections[$x])) {
|
||||
return;
|
||||
}
|
||||
$this->availableConnections[$x] += $writing ? -$this->decWrite : $this->decWrite;
|
||||
}
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user