File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
src/dstack/_internal/core/services/ssh Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -204,13 +204,27 @@ async def aopen(self) -> None:
204204 raise get_ssh_error (stderr )
205205
206206 def close (self ) -> None :
207- subprocess .run (self .close_command (), stdout = subprocess .DEVNULL , stderr = subprocess .DEVNULL )
207+ proc = subprocess .run (
208+ self .close_command (), stdout = subprocess .PIPE , stderr = subprocess .STDOUT
209+ )
210+ if proc .returncode :
211+ logger .error (
212+ "Failed to close SSH tunnel, exit status: %d, output: %s" ,
213+ proc .returncode ,
214+ proc .stdout ,
215+ )
208216
209217 async def aclose (self ) -> None :
210218 proc = await asyncio .create_subprocess_exec (
211- * self .close_command (), stdout = subprocess .DEVNULL , stderr = subprocess .DEVNULL
219+ * self .close_command (), stdout = subprocess .PIPE , stderr = subprocess .STDOUT
212220 )
213221 await proc .wait ()
222+ if proc .returncode :
223+ logger .error (
224+ "Failed to close SSH tunnel, exit status: %d, output: %s" ,
225+ proc .returncode ,
226+ proc .stdout ,
227+ )
214228
215229 async def acheck (self ) -> bool :
216230 proc = await asyncio .create_subprocess_exec (
You can’t perform that action at this time.
0 commit comments