Fixes resource streaming

* Only the first `ResourceBody::$streamGranularity` bytes were sent because of a typo. Additionally, there was a segfault, when I fixed the first mistake.
* Added message for connect timeout exception