Skip to content

Commit

Permalink
fix: fixing linter errors in dsl/client
Browse files Browse the repository at this point in the history
  • Loading branch information
antklim committed Jul 30, 2021
1 parent 4f57f48 commit d88f9c3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dsl/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ func (p *PactClient) StartServer(args []string, port int) *types.MockServer {
svc := p.pactMockSvcManager.NewService(args)
cmd := svc.Start()

waitForPort(port, p.getNetworkInterface(), p.Address, p.TimeoutDuration,
err := waitForPort(port, p.getNetworkInterface(), p.Address, p.TimeoutDuration,
fmt.Sprintf(`Timed out waiting for Mock Server to start on port %d - are you sure it's running?`, port))
if err != nil {
log.Println("[ERROR] client: failed to wait for Mock Server:", err)
}

return &types.MockServer{
Pid: cmd.Process.Pid,
Expand Down Expand Up @@ -137,7 +140,9 @@ func (p *PactClient) RemoveAllServers(server *types.MockServer) []*types.MockSer

for _, s := range p.verificationSvcManager.List() {
if s != nil {
p.pactMockSvcManager.Stop(s.Process.Pid)
if _, err := p.pactMockSvcManager.Stop(s.Process.Pid); err != nil {
log.Println("[ERROR] client: stop server failed:", err)
}
}
}
return nil
Expand Down

0 comments on commit d88f9c3

Please sign in to comment.