We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc194b7 commit 5a42d8cCopy full SHA for 5a42d8c
examples/socket_mode_async_healthcheck.py
@@ -52,5 +52,9 @@ async def start_socket_mode(_web_app: web.Application):
52
global socket_mode_client
53
socket_mode_client = handler.client
54
55
- app.web_app().on_startup.append(start_socket_mode)
56
- app.start(8080)
+ async def shutdown_socket_mode(_web_app: web.Application):
+ await socket_mode_client.close()
57
+
58
+ web_app.on_startup.append(start_socket_mode)
59
+ web_app.on_shutdown.append(shutdown_socket_mode)
60
+ web.run_app(app=web_app, port=8080)
0 commit comments