Eduard Los
1 min readApr 26, 2020

--

Hey, by disconnected you mean that user aborted the connection unexpectedly or closed it after success?

If it is the success, then you just use RequestStream.CompleteAsync() and that will return just statucode 200 and request will be finished without exceptions.

IOException catch block is to catch when connection was unexpectedly aborted (CTRL+C) in my example, which means no metadata was sent before connection stopped, so server doesn’t know what happened which is exceptional situation.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Eduard Los
Eduard Los

Written by Eduard Los

Software engineer, architect, tech enthusiast.

Responses (1)

Write a response