From dd0aa26f5e683929597407984fc44749dfd959bf Mon Sep 17 00:00:00 2001 From: "gu.martinm@gmail.com" Date: Mon, 26 May 2014 17:09:39 +0200 Subject: [PATCH] JsonRPC4NET: TODO, what if HttpContent or HttpResponseMessage is null? --- jsonrpc4net/jsonrpc4net/JsonRpcHttpAsyncClient.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jsonrpc4net/jsonrpc4net/JsonRpcHttpAsyncClient.cs b/jsonrpc4net/jsonrpc4net/JsonRpcHttpAsyncClient.cs index 8864290..fc93ee3 100644 --- a/jsonrpc4net/jsonrpc4net/JsonRpcHttpAsyncClient.cs +++ b/jsonrpc4net/jsonrpc4net/JsonRpcHttpAsyncClient.cs @@ -113,10 +113,12 @@ namespace GumartinM.JsonRPC4NET using (HttpClient client = new HttpClient { Timeout = TimeSpan.FromSeconds(5) }) using (HttpContent contentPOST = new StringContent(jsonData, System.Text.Encoding.UTF8, "application/json-rpc")) using (HttpResponseMessage response = await client.PostAsync(uri, contentPOST, cancellation)) + //TODO: What if response is null? :( using (HttpContent contentRESULT = response.Content) { if (response.StatusCode == HttpStatusCode.OK) { + //TODO: What if contentRESULT is null? :( return await this.ReadResponseAsync(contentRESULT); } -- 2.1.4