|
7 | 7 |
|
8 | 8 | namespace Elasticsearch.Net |
9 | 9 | { |
10 | | - public class ResponseBuilder<TReturn> |
| 10 | + public class ResponseBuilder<TReturn> |
11 | 11 | where TReturn : class |
12 | | - |
| 12 | + |
13 | 13 | { |
14 | 14 | private const int BufferSize = 81920; |
15 | 15 | private static readonly VoidResponse Void = new VoidResponse(); |
@@ -86,7 +86,7 @@ private void SetBody(ElasticsearchResponse<TReturn> response, Stream stream) |
86 | 86 | if (this._requestData.CustomConverter != null) response.Body = this._requestData.CustomConverter(response, stream) as TReturn; |
87 | 87 | else response.Body = this._requestData.ConnectionSettings.Serializer.Deserialize<TReturn>(stream); |
88 | 88 | } |
89 | | - if (response.AllowAllStatusCodes) |
| 89 | + if (response.AllowAllStatusCodes) |
90 | 90 | ReadServerError(response, new MemoryStream(bytes), bytes); |
91 | 91 | } |
92 | 92 | else if (response.HttpStatusCode != null) |
@@ -115,10 +115,10 @@ private async Task SetBodyAsync(ElasticsearchResponse<TReturn> response, Stream |
115 | 115 | else response.Body = await this._requestData.ConnectionSettings.Serializer.DeserializeAsync<TReturn>(stream, this._cancellationToken).ConfigureAwait(false); |
116 | 116 | } |
117 | 117 | if (response.AllowAllStatusCodes) |
118 | | - await ReadServerErrorAsync(response, new MemoryStream(bytes), bytes); |
| 118 | + await ReadServerErrorAsync(response, new MemoryStream(bytes), bytes).ConfigureAwait(false); |
119 | 119 | } |
120 | 120 | else if (response.HttpStatusCode != null) |
121 | | - await ReadServerErrorAsync(response, stream, bytes); |
| 121 | + await ReadServerErrorAsync(response, stream, bytes).ConfigureAwait(false); |
122 | 122 | } |
123 | 123 | } |
124 | 124 |
|
|
0 commit comments