| Index: runtime/bin/socket.cc
|
| diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
|
| index ae73152368703e3b872d9266964b5ebc6fa9539c..e0e82420b8f7461396e27d514adb8234aaf33888 100644
|
| --- a/runtime/bin/socket.cc
|
| +++ b/runtime/bin/socket.cc
|
| @@ -187,7 +187,7 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
|
| Dart_PropagateError(result);
|
| }
|
| bytes_written = Socket::Write(socket, buffer, length);
|
| - if (bytes_written > 0) total_bytes_written = bytes_written;
|
| + total_bytes_written = bytes_written;
|
| } else {
|
| // Send data in chunks of maximum 16KB.
|
| const intptr_t max_chunk_length =
|
| @@ -206,11 +206,11 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
|
| }
|
| bytes_written =
|
| Socket::Write(socket, reinterpret_cast<void*>(buffer), chunk_length);
|
| - if (bytes_written > 0) total_bytes_written += bytes_written;
|
| + total_bytes_written += bytes_written;
|
| } while (bytes_written > 0 && total_bytes_written < length);
|
| delete[] buffer;
|
| }
|
| - if (total_bytes_written >= 0) {
|
| + if (bytes_written >= 0) {
|
| Dart_SetReturnValue(args, Dart_NewInteger(total_bytes_written));
|
| } else {
|
| Dart_SetReturnValue(args, DartUtils::NewDartOSError());
|
|
|