diff --git a/Deepgram/Abstractions/Constants.cs b/Deepgram/Abstractions/Constants.cs index 3f8cc885..97fa3ebd 100644 --- a/Deepgram/Abstractions/Constants.cs +++ b/Deepgram/Abstractions/Constants.cs @@ -12,6 +12,6 @@ public static class Constants // For Speak Headers public const int OneSecond = 1000; public const int OneMinute = 60 * OneSecond; - public const int DefaultRESTTimeout = 5 * OneMinute; + public const int DefaultRESTTimeout = 30 * OneSecond; } diff --git a/Deepgram/Clients/Live/v1/Client.cs b/Deepgram/Clients/Live/v1/Client.cs index 2c590644..4b4c0092 100644 --- a/Deepgram/Clients/Live/v1/Client.cs +++ b/Deepgram/Clients/Live/v1/Client.cs @@ -707,7 +707,7 @@ public async Task Stop(CancellationTokenSource? cancelToken = null) if (cancelToken == null) { Log.Information("Stop", "Using default disconnect cancellation token"); - cancelToken = new CancellationTokenSource(Constants.DefaultConnectTimeout); + cancelToken = new CancellationTokenSource(Constants.DefaultDisconnectTimeout); } try diff --git a/Deepgram/Clients/Live/v1/Constants.cs b/Deepgram/Clients/Live/v1/Constants.cs index 957332c7..bb10c024 100644 --- a/Deepgram/Clients/Live/v1/Constants.cs +++ b/Deepgram/Clients/Live/v1/Constants.cs @@ -14,5 +14,6 @@ public static class Constants // Default timeout for connect/disconnect public const int DefaultConnectTimeout = 5000; + public const int DefaultDisconnectTimeout = 5000; }