|
|
@ -182,7 +182,7 @@ static void ReadAction(void* arg, grpc_error* error) { |
|
|
|
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Socket closed"), ep)); |
|
|
|
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Socket closed"), ep)); |
|
|
|
EP_UNREF(ep, "read"); |
|
|
|
EP_UNREF(ep, "read"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (read_size < len) { |
|
|
|
if (read_size < static_cast<CFIndex>(len)) { |
|
|
|
grpc_slice_buffer_trim_end(ep->read_slices, len - read_size, nullptr); |
|
|
|
grpc_slice_buffer_trim_end(ep->read_slices, len - read_size, nullptr); |
|
|
|
} |
|
|
|
} |
|
|
|
CallReadCb(ep, GRPC_ERROR_NONE); |
|
|
|
CallReadCb(ep, GRPC_ERROR_NONE); |
|
|
@ -217,7 +217,7 @@ static void WriteAction(void* arg, grpc_error* error) { |
|
|
|
CallWriteCb(ep, error); |
|
|
|
CallWriteCb(ep, error); |
|
|
|
EP_UNREF(ep, "write"); |
|
|
|
EP_UNREF(ep, "write"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (write_size < GRPC_SLICE_LENGTH(slice)) { |
|
|
|
if (write_size < static_cast<CFIndex>(GRPC_SLICE_LENGTH(slice))) { |
|
|
|
grpc_slice_buffer_undo_take_first( |
|
|
|
grpc_slice_buffer_undo_take_first( |
|
|
|
ep->write_slices, grpc_slice_sub(slice, write_size, slice_len)); |
|
|
|
ep->write_slices, grpc_slice_sub(slice, write_size, slice_len)); |
|
|
|
} |
|
|
|
} |
|
|
|