If the request points to a non-existing server or port with no HTTP service, the code fails without invoking OnError().
The problem lies in HandleGetRequestStream of AsyncEventRequest where there is no error checking of the async result - it will call EndGetRequestStream even if no stream is available.
Consider this example:
If the request points to a non-existing server or port with no HTTP service, the code fails without invoking OnError().
The problem lies in
HandleGetRequestStream
ofAsyncEventRequest
where there is no error checking of the async result - it will callEndGetRequestStream
even if no stream is available.