ping should not expect a message if it's not sent
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m41s
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m41s
This commit is contained in:
@@ -383,10 +383,13 @@ func (p *SyncedPool) OwnerChanged(id CartId, host string) error {
|
|||||||
|
|
||||||
func DoPing(host *RemoteHost) error {
|
func DoPing(host *RemoteHost) error {
|
||||||
log.Printf("Pinging remote %s\n", host.Host)
|
log.Printf("Pinging remote %s\n", host.Host)
|
||||||
SendPacket(host, Ping, func(w io.Writer) error {
|
err := SendPacket(host, Ping, func(w io.Writer) error {
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
_, err := host.Expect(Pong, time.Second)
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_, err = host.Expect(Pong, time.Second)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user