Currently, when we try execute a command like sandbox.commands.run after sandbox.supend and sandbox.resume, the local port forward tunnel still points to the old IP and takes 60 sec of retry to reinitiate a new connection with the updated IP.
We can explicitly close the underlying connector (which stops the port-forwarding process) during the suspend and resume methods. The next time a command execution or file operation occurs, the SandboxConnector will automatically spin up a fresh tunnel that correctly routes to the new Pod IP.
Currently, when we try execute a command like
sandbox.commands.runaftersandbox.supendandsandbox.resume, the local port forward tunnel still points to the old IP and takes 60 sec of retry to reinitiate a new connection with the updated IP.We can explicitly close the underlying connector (which stops the port-forwarding process) during the
suspendandresumemethods. The next time a command execution or file operation occurs, theSandboxConnectorwill automatically spin up a fresh tunnel that correctly routes to the new Pod IP.