ensure hijackedConn implements CloseWrite function#36517
Conversation
|
ignore powerpc failure, unrelated and debugging. |
Automatic merge from submit-queue. UPSTREAM: <carry>: ensure hijackedConn implements CloseWrite function moby/moby#36516 moby/moby#36517
|
@runcom @thaJeztah ping |
|
LGTM ping @cpuguy83 |
|
Thanks! Is is possible to have a test for this? |
|
PowerPC failures are not related |
|
nit: perhaps would be good to have the description of #36516 in the commit-message |
|
It would be good to only implement CloseWrite if the underlying conn does. |
|
Also we should think about removing this, I think? |
209657e to
80ecc25
Compare
Codecov Report
@@ Coverage Diff @@
## master #36517 +/- ##
=========================================
Coverage ? 35.13%
=========================================
Files ? 613
Lines ? 45639
Branches ? 0
=========================================
Hits ? 16036
Misses ? 27462
Partials ? 2141 |
|
Repushed adding a type assertion and improving the commit message. Beyond the type assertion I can't see a straightforward test case for this? |
| // If there is buffered content, wrap the connection | ||
| c = &hijackedConn{c, br} | ||
| // If there is buffered content, wrap the connection. We return an | ||
| // object that implements CloseWrite iff the underlying connection |
There was a problem hiding this comment.
I actually meant iff, as in "if and only if" :)
|
@runcom still LGTY? |
|
Yup! |
|
test-failing is unrelated |
|
Just to note that in a couple of other places we have something like this instead: Lines 26 to 33 in c3b3be5 and this: Lines 133 to 139 in c3b3be5 Looking at this, I have two conflicting thoughts:
So, should we instead change the above two places to a hack similar to the one in this PR? update: improve wording |
|
@kolyshkin I think so. But we probably don't need as complicated fix. For |
|
We don't need |
CloseWrite whenever its underlying connection does. If this isn't done, then a container listening on stdin won't receive an EOF when the client closes the stream at their end. moby/moby#36516 moby/moby#36517
…rite function moby#36516 moby#36517 Origin-commit: 99ac39cbfbec9459f085b9f6cf786945b9e00867
Fixes #36516