0

I’m trying to implement a timeout feature based on NetworkStream old Async methods.
Due to the fact that calling EndRead to a closed NetworkStream will throw an "ObjectDisposedException", I wonder if I can simply avoid to call EndRead instead of catching that exception as it is like an ugly hack.

DIF
  • 2,470
  • 6
  • 35
  • 49
AhSeng Fan
  • 397
  • 5
  • 11

0 Answers0