mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-05 06:44:51 +00:00
Don't try to stop a non-started Client
This commit is contained in:
parent
10452dc545
commit
fcf0e4515f
1 changed files with 3 additions and 0 deletions
|
|
@ -245,6 +245,9 @@ class Client:
|
|||
"""Use this method to manually stop the Client.
|
||||
Requires no parameters.
|
||||
"""
|
||||
if not self.is_started:
|
||||
raise ConnectionError("Client is already stopped")
|
||||
|
||||
self.is_started = False
|
||||
self.session.stop()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue