Skip to content

Commit 6b0b467

Browse files
committed
fix: 修复 Ctrl-C 关闭服务的 Bug
Signed-off-by: Ke Jie <[email protected]>
1 parent 49c1e9c commit 6b0b467

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dingtalk_stream/stream.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def start_forever(self):
117117
while True:
118118
try:
119119
asyncio.run(self.start())
120-
except KeyboardInterrupt:
120+
except KeyboardInterrupt as e:
121121
break
122122
except (asyncio.exceptions.CancelledError,
123123
websockets.exceptions.ConnectionClosedError) as e:
@@ -127,7 +127,6 @@ def start_forever(self):
127127
except Exception as e:
128128
time.sleep(3)
129129
self.logger.exception('unknown exception', e)
130-
finally:
131130
continue
132131

133132
def open_connection(self):

0 commit comments

Comments
 (0)