OctopusDeploy / Halibut

| Public | A secure communication stack for .NET using JSON-RPC over SSL.
Other
12 stars 44 forks source link

WriteIntoMemoryBufferStream should not try to write bytes twice #456

Closed LukeButters closed 1 year ago

LukeButters commented 1 year ago

Background

I am seeing exceptions in the dispose method of the WriteIntoMemoryBufferStream. This is likely to be because WriteBufferToUnderlyingStream fails and then it tries to do the same write again in dispose.

We should never attempt to re-write the same bytes on a stream after a stream has thrown an exception.

[SC-57434]

Related to https://github.com/OctopusDeploy/Issues/issues/8266

How to review this PR

Quality :heavy_check_mark:

Pre-requisites

shortcut-integration[bot] commented 1 year ago

This pull request has been linked to Shortcut Story #57434: Stop writing message buffer twice.