Skip to content

Commit

Permalink
Merge pull request #25 from elendil-software/fix/disposed-exception
Browse files Browse the repository at this point in the history
HttpRequestException were not correctly handled and produced an ObjectDisposedException
  • Loading branch information
elendil-software authored Oct 16, 2022
2 parents 4061946 + 69e8e30 commit 2d2f346
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IPX800cs/Commands/Senders/CommandSenderHttp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public string ExecuteCommand(Command command)
response.EnsureSuccessStatusCode();
return ReadResponse(response);
}
catch (HttpRequestException e)
{
throw new IPX800SendCommandException(e.Message, e);
}
catch (Exception e) when (e is not IPX800SendCommandException)
{
var message = response != null ? ReadResponse(response) : "";
Expand Down

0 comments on commit 2d2f346

Please sign in to comment.