mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
send line update via websocket synchronously before calling the cmdwait callback. ensures line arrives on fe client before any command updates or pty updates
This commit is contained in:
@@ -191,7 +191,9 @@ func RunCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sstore.U
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return sstore.ModelUpdate{Line: rtnLine, Cmd: cmd}, nil
|
||||
update := sstore.ModelUpdate{Line: rtnLine, Cmd: cmd, Interactive: pk.Interactive}
|
||||
sstore.MainBus.SendUpdate(ids.SessionId, update)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func addToHistory(ctx context.Context, pk *scpacket.FeCommandPacketType, update sstore.UpdatePacket, isMetaCmd bool, hadError bool) error {
|
||||
|
||||
Reference in New Issue
Block a user