Skip to content

Commit d54dd2f

Browse files
authored
AIRND-1096-feat: add DEFAULT_SOCKET_TIMEOUT constant and integrate into StreamConnection (#46)
1 parent 9711a2c commit d54dd2f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

aiola/clients/stt/stream_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import socketio
55

6+
from ...constants import DEFAULT_SOCKET_TIMEOUT
67
from ...errors import AiolaError, AiolaStreamingError, AiolaValidationError
78
from ...types import AiolaClientOptions, LiveEvents
89

@@ -27,6 +28,7 @@ def __init__(
2728
reconnection=True,
2829
reconnection_attempts=3,
2930
reconnection_delay=1,
31+
request_timeout=DEFAULT_SOCKET_TIMEOUT,
3032
)
3133

3234
def connect(self) -> None:
@@ -132,6 +134,7 @@ def __init__(
132134
reconnection=True,
133135
reconnection_attempts=3,
134136
reconnection_delay=1,
137+
request_timeout=DEFAULT_SOCKET_TIMEOUT,
135138
)
136139

137140
async def connect(self) -> None:

aiola/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
}
77

88
DEFAULT_HTTP_TIMEOUT = 150
9+
DEFAULT_SOCKET_TIMEOUT = 15
910

1011
DEFAULT_WORKFLOW_ID = "2c78fcf1-9265-408f-b8c3-d9d7e7ebc1bc"

0 commit comments

Comments
 (0)