mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve istream
This commit is contained in:
parent
eec4c0c77a
commit
b7d54af60b
@ -86,8 +86,13 @@ int32_t tk_istream_read_len(tk_istream_t* stream, uint8_t* buff, uint32_t max_si
|
||||
|
||||
read_bytes = tk_istream_read(stream, buff + offset, remain_bytes);
|
||||
if (read_bytes <= 0) {
|
||||
log_debug("errno=%d\n", errno);
|
||||
break;
|
||||
if (!object_get_prop_bool(OBJECT(stream), TK_STREAM_PROP_IS_OK, TRUE)) {
|
||||
log_debug("stream is broken\n");
|
||||
break;
|
||||
} else {
|
||||
log_debug("not get data\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
offset += read_bytes;
|
||||
|
Loading…
Reference in New Issue
Block a user