Skip to content

Commit

Permalink
Close connections on enclave requests (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendecoste authored Aug 9, 2022
1 parent 4f49869 commit a789ad2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions capetest/capetest.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func CapeTest(testReq TestRequest, endpoint string, insecure bool, pcrSlice []st
}
return nil, err
}
defer conn.Close()

nonce, err := crypto.GetNonce()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions cmd/cape/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ func doDeploy(url string, name string, reader io.Reader, insecure bool, pcrSlice
}
return "", nil, err
}
defer conn.Close()

p := runner.Protocol{Websocket: conn}

Expand Down
2 changes: 2 additions & 0 deletions cmd/cape/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ func doRun(url string, functionID string, data []byte, insecure bool, funcHash [
}
return nil, err
}
defer c.Close()

nonce, err := crypto.GetNonce()
if err != nil {
return nil, err
Expand Down

0 comments on commit a789ad2

Please sign in to comment.