don't send done packet when detached

This commit is contained in:
sawka 2022-07-06 00:25:59 -07:00
parent 0d585e5959
commit 9aa684882b

View File

@ -121,7 +121,7 @@ func (m *MServer) runCommand(runPacket *packet.RunPacketType) {
go func() {
defer m.RemoveFdContext(runPacket.CK)
donePk, err := shexec.RunClientSSHCommandAndWait(runPacket, fdContext, shexec.SSHOpts{}, m, m.Debug)
if donePk != nil {
if donePk != nil && !runPacket.Detached {
m.Sender.SendPacket(donePk)
}
if err != nil {