Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
update kick function in cl3
Browse files Browse the repository at this point in the history
  • Loading branch information
tnix100 committed Sep 9, 2024
1 parent 16a92d8 commit 86e8d37
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cloudlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ def proxy_api_request(
return resp
else:
match resp["type"]:
case "repairModeEnabled":
self.kick()
case "ipBlocked"|"registrationBlocked":
self.send_statuscode("Blocked", listener)
case "badRequest":
Expand Down Expand Up @@ -357,10 +355,8 @@ def send(self, cmd: str, val: Any, extra: Optional[dict] = None, listener: Optio
def send_statuscode(self, statuscode: str, listener: Optional[str] = None):
return self.send("statuscode", self.server.statuscodes[statuscode], listener=listener)

def kick(self):
async def _kick():
await self.websocket.close()
asyncio.run(_kick())
async def kick(self):
await self.websocket.close()

class CloudlinkCommands:
@staticmethod
Expand Down

0 comments on commit 86e8d37

Please sign in to comment.