Skip to content
Open
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
3 changes: 2 additions & 1 deletion obs-websocket-dotnet/OBSWebsocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ internal JObject SendRequest(MessageTypes operationCode, string requestType, JOb
}

// Wait for a response (received and notified by the websocket response handler)
tcs.Task.Wait(wsTimeout.Milliseconds);
if(!tcs.Task.Wait((int)wsTimeout.TotalMilliseconds))
throw new ErrorResponseException("Request timed out", 1);

if (tcs.Task.IsCanceled)
throw new ErrorResponseException("Request canceled", 0);
Expand Down