From 0c95ce63833fe795cac5d0abfc9271c2e2c6d614 Mon Sep 17 00:00:00 2001 From: Jan Schmidle Date: Fri, 20 Nov 2020 13:16:46 +0100 Subject: [PATCH] remove check for empty webSocket message The backend sends an empty webSocket message after establishing an connection. The removed lines of code interpreted that as an EOL which exits the webSocket read loop. As the Windows code doesn't do that as well, I removed it here as well now. The terminal gets closed after the webSocket closes anyway. Fixes: https://github.com/Azure/azure-cli/issues/15856 --- src/azure-cli/azure/cli/command_modules/container/custom.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/container/custom.py b/src/azure-cli/azure/cli/command_modules/container/custom.py index 43a94335280..65c2ce47f52 100644 --- a/src/azure-cli/azure/cli/command_modules/container/custom.py +++ b/src/azure-cli/azure/cli/command_modules/container/custom.py @@ -681,8 +681,6 @@ def _cycle_exec_pipe(ws): r, _, _ = select.select([ws.sock, sys.stdin], [], []) if ws.sock in r: data = ws.recv() - if not data: - return False sys.stdout.write(data) sys.stdout.flush() if sys.stdin in r: