Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SocketModeClient expose async event loop param #1609

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion slack_sdk/socket_mode/aiohttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import asyncio
import logging
import time
from asyncio import AbstractEventLoop
from asyncio import Future, Lock
from asyncio import Queue
from logging import Logger
Expand Down Expand Up @@ -79,6 +80,7 @@ def __init__(
on_message_listeners: Optional[List[Callable[[WSMessage], Awaitable[None]]]] = None,
on_error_listeners: Optional[List[Callable[[WSMessage], Awaitable[None]]]] = None,
on_close_listeners: Optional[List[Callable[[WSMessage], Awaitable[None]]]] = None,
loop: Optional[AbstractEventLoop] = None,
):
"""Socket Mode client

Expand Down Expand Up @@ -124,7 +126,7 @@ def __init__(
# over the lifetime of your application,
# it is suggested you use a single session for the lifetime of your application
# to benefit from connection pooling.
self.aiohttp_client_session = aiohttp.ClientSession()
self.aiohttp_client_session = aiohttp.ClientSession(loop=loop)

self.on_message_listeners = on_message_listeners or []
self.on_error_listeners = on_error_listeners or []
Expand Down
Loading