Fix typo in MsgIdHandler::check_message_id (#44)

* Fix set_channel_state method

* Fix some memory leak problems

* Fix code style

* Fix typo
This commit is contained in:
mix6s 2017-01-20 19:07:34 +03:00 committed by Daniil Gentili
parent 15cc8f6e82
commit 2e23a2335c

View File

@ -61,8 +61,8 @@ trait MsgIdHandler
}
}
if (count($this->datacenter->incoming_messages) > $this->settings['msg_array_limit']['incoming']) {
reset($this->datacenter->outgoing_messages);
unset($this->datacenter->outgoing_messages[key($this->datacenter->outgoing_messages)]);
reset($this->datacenter->incoming_messages);
unset($this->datacenter->incoming_messages[key($this->datacenter->incoming_messages)]);
}
$this->datacenter->incoming_messages[$new_message_id] = [];
ksort($this->datacenter->incoming_messages);