Bugfixes in atconnect, atwss(async functions)

This commit is contained in:
DarkCat09 2022-05-18 18:33:21 +04:00
parent f606cfd521
commit b02e833702
6 changed files with 69 additions and 68 deletions

View file

@ -24,16 +24,14 @@ async def main():
)
async def commands():
try:
while True:
cmd = await aioconsole.ainput('> ')
await socket.send({
'stream': 'console',
'type': 'command',
'data': cmd
})
except KeyboardInterrupt:
await socket.close()
print('* Exit')
while True:
cmd = await aioconsole.ainput('> ')
if cmd.strip() == '':
continue
await socket.send({
'stream': 'console',
'type': 'command',
'data': cmd
})
asyncio.run(main())