summaryrefslogtreecommitdiff
path: root/Userland/Utilities/nc.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-03-01 17:24:50 +0100
committerLinus Groh <mail@linusgroh.de>2023-03-13 15:16:20 +0000
commitae51c1821c0d32ba40b866d8e5561f6de3359b17 (patch)
tree6bd2d0964841bf5bd56797ad4a887e8e4e3ac63c /Userland/Utilities/nc.cpp
parent26516ee1601b0662bb1753f834a179bf1a20082d (diff)
downloadserenity-ae51c1821c0d32ba40b866d8e5561f6de3359b17.zip
Everywhere: Remove unintentional partial stream reads and writes
Diffstat (limited to 'Userland/Utilities/nc.cpp')
-rw-r--r--Userland/Utilities/nc.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Utilities/nc.cpp b/Userland/Utilities/nc.cpp
index 858bbed77d..7ea01aeccd 100644
--- a/Userland/Utilities/nc.cpp
+++ b/Userland/Utilities/nc.cpp
@@ -82,8 +82,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto nread = TRY(Core::System::read(STDIN_FILENO, buffer_span));
buffer_span = buffer_span.trim(nread);
- // FIXME: This should write the entire span.
- TRY(socket->write_some({ buffer_span.data(), static_cast<size_t>(nread) }));
+ TRY(socket->write_until_depleted({ buffer_span.data(), static_cast<size_t>(nread) }));
}
}