Skip to content

Commit

Permalink
update code of usage of gorpc waitgroup (#6661)
Browse files Browse the repository at this point in the history
<details open>
<summary><a href="https://tyktech.atlassian.net/browse/TT-13130"
title="TT-13130" target="_blank">TT-13130</a></summary>
  <br />
  <table>
    <tr>
      <th>Summary</th>
<td>Tyk Cloud: Panic appears when a user tried to deploy GW before
Control Plane is in deployed state </td>
    </tr>
    <tr>
      <th>Type</th>
      <td>
<img alt="Bug"
src="https://tyktech.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10303?size=medium"
/>
        Bug
      </td>
    </tr>
    <tr>
      <th>Status</th>
      <td>In Dev</td>
    </tr>
    <tr>
      <th>Points</th>
      <td>N/A</td>
    </tr>
    <tr>
      <th>Labels</th>
<td><a
href="https://tyktech.atlassian.net/issues?jql=project%20%3D%20TT%20AND%20labels%20%3D%20Re_open%20ORDER%20BY%20created%20DESC"
title="Re_open">Re_open</a>, <a
href="https://tyktech.atlassian.net/issues?jql=project%20%3D%20TT%20AND%20labels%20%3D%20QA_Fail%20ORDER%20BY%20created%20DESC"
title="QA_Fail">QA_Fail</a></td>
    </tr>
  </table>
</details>
<!--
  do not remove this marker as it will break jira-lint's functionality.
  added_by_jira_lint
-->

---

<!-- Provide a general summary of your changes in the Title above -->

## Description

<!-- Describe your changes in detail -->

## Related Issue

<!-- This project only accepts pull requests related to open issues. -->
<!-- If suggesting a new feature or change, please discuss it in an
issue first. -->
<!-- If fixing a bug, there should be an issue describing it with steps
to reproduce. -->
<!-- OSS: Please link to the issue here. Tyk: please create/link the
JIRA ticket. -->

## Motivation and Context

<!-- Why is this change required? What problem does it solve? -->

## How This Has Been Tested

<!-- Please describe in detail how you tested your changes -->
<!-- Include details of your testing environment, and the tests -->
<!-- you ran to see how your change affects other areas of the code,
etc. -->
<!-- This information is helpful for reviewers and QA. -->

## Screenshots (if appropriate)

## Types of changes

<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Refactoring or add test (improvements in base code or adds test
coverage to functionality)

## Checklist

<!-- Go over all the following points, and put an `x` in all the boxes
that apply -->
<!-- If there are no documentation updates required, mark the item as
checked. -->
<!-- Raise up any additional concerns not covered by the checklist. -->

- [ ] I ensured that the documentation is up to date
- [ ] I explained why this PR updates go.mod in detail with reasoning
why it's required
- [ ] I would like a code coverage CI quality gate exception and have
explained why

---------

Co-authored-by: sredny buitrago <[email protected]>

(cherry picked from commit 52bd4ee)
  • Loading branch information
sredxny authored and Tyk Bot committed Oct 23, 2024
1 parent 2aae23b commit 96a25d4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions rpc/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,6 @@ func Connect(connConfig Config, suppressRegister bool, dispatcherFuncs map[strin
clientSingleton.Conns = 5
}

for i := 0; i < clientSingleton.Conns; i++ {
connectionDialingWG.Add(1)
}

clientSingleton.Dial = func(addr string) (conn net.Conn, err error) {
dialer := &net.Dialer{
Timeout: 10 * time.Second,
Expand Down Expand Up @@ -298,8 +294,6 @@ func Connect(connConfig Config, suppressRegister bool, dispatcherFuncs map[strin
conn.Write([]byte("proto2"))
conn.Write([]byte{byte(len(connID))})
conn.Write([]byte(connID))
// only mark as done is connection is established
connectionDialingWG.Done()

return conn, nil
}
Expand Down

0 comments on commit 96a25d4

Please sign in to comment.