Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Tested/noticed on Android, same issue identified in the Harmony code base, too
-
Patch Available
-
Novice
Description
Even blocking writes can return before the full amount is written, e.g. if a signal is received, or for any other arbitrary reason.
The java.io.OutputStream.write() interface that SocketOutputStream implements returns void, and cannot report short writes to the caller, and therefore is required to loop to retry writing until everything is written, or until writing fails.
The same issue is reported to Android at https://review.source.android.com/21459.