Skip to content

Commit

Permalink
test connection with ping
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Gololicic committed Jan 3, 2023
1 parent 9c65e36 commit 0a05662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion languageserver/integration/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (f *flowkitClient) Initialize(configPath string, numberOfAccounts int) erro
var emulator gateway.Gateway
// try connecting to already running local emulator
emulator, err = gateway.NewGrpcGateway(config.DefaultEmulatorNetwork().Host)
if err != nil { // fallback to hosted emulator if error
if err != nil || emulator.Ping() != nil { // fallback to hosted emulator if error
emulator = gateway.NewEmulatorGateway(serviceAccount)
}

Expand Down

0 comments on commit 0a05662

Please sign in to comment.