Fix a issue which stops send bytes when the buffer is filled quickly. It happens when the download is paused and then resumed, or the downloading speed is high.
Stop receiving data when buffer is above the limit. It won't throw an exception when buffer is full. Just wait until the client accepts more bytes.
Stop downloading and disconnect from xunlei server if the client is disconnected.