Skip to content

Commit d131e5d

Browse files
committed
feat: 支持 Ctrl-C 关闭服务
Signed-off-by: Ke Jie <[email protected]>
1 parent ce320b6 commit d131e5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dingtalk_stream/stream.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ def start_forever(self):
117117
while True:
118118
try:
119119
asyncio.run(self.start())
120+
except KeyboardInterrupt:
121+
break
120122
except (asyncio.exceptions.CancelledError,
121123
websockets.exceptions.ConnectionClosedError) as e:
122124
self.logger.error('network exception, error=%s', e)

0 commit comments

Comments
 (0)