I am using
WinJS.Promise.timeout(timeout, stream.readAsync(buffer, 4096, partial))
to read from a stream and cancel the operation, in case there is no data on the stream. This works, the method cancels the promise after a timeout, but this also closes the streams socket connection. Why is that? And how could I deal with it?