mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 01:51:53 +08:00
atomic fixes, removed tasked and muted
This commit is contained in:
@@ -64,13 +64,10 @@ class WakeOnLan:
|
||||
async def wakeup(self) -> None:
|
||||
if not self.__magic:
|
||||
raise WolDisabledError()
|
||||
await self.__inner_wakeup()
|
||||
|
||||
@aiotools.tasked
|
||||
@aiotools.muted("Can't perform Wake-on-LAN or operation was not completed")
|
||||
async def __inner_wakeup(self) -> None:
|
||||
logger = get_logger(0)
|
||||
logger.info("Waking up %s (%s:%s) using Wake-on-LAN ...", self.__mac, self.__ip, self.__port)
|
||||
|
||||
sock: Optional[socket.socket] = None
|
||||
try:
|
||||
# TODO: IPv6 support: http://lists.cluenet.de/pipermail/ipv6-ops/2014-September/010139.html
|
||||
|
||||
Reference in New Issue
Block a user