Skip to content

Commit b555e4b

Browse files
author
epriestley
committed
Use more sensible waitForAny semantics in SSH process
Summary: Ref T4189. Updates the Phabricator stuff to use the new, more sensible semantics from D7769. Basically, this works correctly now and doesn't need workarounds. Test Plan: Pushed Wine repo in 1m13s. Reviewers: btrahan, zeeg Reviewed By: btrahan CC: aran Maniphest Tasks: T4189 Differential Revision: https://secure.phabricator.com/D7770
1 parent 0011068 commit b555e4b

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/infrastructure/ssh/PhabricatorSSHPassthruCommand.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,6 @@ public function setWillWriteCallback($will_write_callback) {
7676

7777
public function writeErrorIOCallback(PhutilChannel $channel, $data) {
7878
$this->errorChannel->write($data);
79-
80-
// TODO: Because of the way `waitForAny()` works, we degrade to a busy
81-
// wait if we hand it a writable, write-only channel. We should handle this
82-
// case better in `waitForAny()`. For now, just flush the error channel
83-
// explicity after writing data over it.
84-
85-
$this->errorChannel->flush();
8679
}
8780

8881
public function execute() {
@@ -105,9 +98,7 @@ public function execute() {
10598
$channels = array($command_channel, $io_channel, $error_channel);
10699

107100
while (true) {
108-
// TODO: See note in writeErrorIOCallback!
109-
$wait = array($command_channel, $io_channel);
110-
PhutilChannel::waitForAny($wait);
101+
PhutilChannel::waitForAny($channels);
111102

112103
$io_channel->update();
113104
$command_channel->update();

0 commit comments

Comments
 (0)