Skip to content

Commit e641979

Browse files
authored
Merge pull request #58 from nullorvoid/fix/timeouterror
Logging timeout to server
2 parents 1081b73 + ff26cce commit e641979

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

HTTPRequest/HTTPRequest.DotNet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public HttpRequest(string url, string contentType, byte[] postData, Dictionary<s
4646
// Start timeout timer
4747
timeoutTimer = new Timer((object state) => {
4848
this.Abort();
49-
cb(new Exception("Request timed out"), null);
49+
cb(new HttpRequestException("Request timed out", 0), null);
5050
}, null, timeout, Timeout.Infinite);
5151

5252
// Initialize request instance

HTTPRequest/HTTPRequest.Unity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private IEnumerator WaitLoop()
7979
{
8080
// Timed out abort the request with timeout error
8181
Abort();
82-
cb(new Exception("Request timed out"), null);
82+
cb(new HttpRequestException("Request timed out", 0), null);
8383
yield break;
8484
}
8585

0 commit comments

Comments
 (0)