Skip to content

Commit

Permalink
Merge pull request #7274 from hashicorp/b-exec-tls
Browse files Browse the repository at this point in the history
api: alloc exec recovers from bad client connection
  • Loading branch information
Mahmood Ali committed Mar 5, 2020
2 parents d5fa078 + c50f295 commit 8fe78c2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions api/allocations.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"net"
"sort"
"strconv"
"sync"
Expand Down Expand Up @@ -234,11 +233,7 @@ func (a *Allocations) execFrames(ctx context.Context, alloc *Allocation, task st
var conn *websocket.Conn

if nodeClient != nil {
conn, _, err = nodeClient.websocket(reqPath, q)
if _, ok := err.(net.Error); err != nil && !ok {
errCh <- err
return nil, nil
}
conn, _, _ = nodeClient.websocket(reqPath, q)
}

if conn == nil {
Expand Down

0 comments on commit 8fe78c2

Please sign in to comment.