Skip to content

Commit

Permalink
Update Pyrogram to v2.2.2 (#130)
Browse files Browse the repository at this point in the history
Try to fix #123 by sleeping for more time in invoke function
  • Loading branch information
SpEcHiDe authored Jan 1, 2025
1 parent 0b2cffb commit ccd80ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyrogram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.

__fork_name__ = "pyrotgfork"
__version__ = "2.2.1"
__version__ = "2.2.2"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan <https://github.com/delivrance>"

Expand Down
2 changes: 2 additions & 0 deletions pyrogram/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ async def invoke(
timeout: float = WAIT_TIMEOUT,
sleep_threshold: float = SLEEP_THRESHOLD
):
sleep_threshold = max(sleep_threshold, self.client.sleep_threshold)

try:
await asyncio.wait_for(self.is_connected.wait(), self.WAIT_TIMEOUT)
except asyncio.TimeoutError:
Expand Down

0 comments on commit ccd80ab

Please sign in to comment.