mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-07 19:28:44 +01:00
fix nil ptr exception (because GetType() returns a value even when pk is nil)
This commit is contained in:
parent
a4b8819948
commit
3240b128e1
@ -728,6 +728,9 @@ func RunInstallFromCmd(ctx context.Context, ecmd *exec.Cmd, tryDetect bool, mshe
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
}
|
||||
if pk == nil {
|
||||
return fmt.Errorf("no response packet received from client")
|
||||
}
|
||||
if pk.GetType() == packet.InitPacketStr && firstInit {
|
||||
firstInit = false
|
||||
initPacket := pk.(*packet.InitPacketType)
|
||||
|
Loading…
Reference in New Issue
Block a user