Skip to content

Conversation

@arthurschreiber
Copy link
Collaborator

This refactors Connection#makeRequest to be an async function, and to use async/await to make the code flow more explicit.

I pulled in all the logic from enter handlers of the SENT_CLIENT_REQUEST and SENT_ATTENTION states, so Connection#makeRequest contains now all the logic of sending a request, handling cancellation, and reading the response.

@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Merging #1492 (903c1c5) into master (b78df14) will increase coverage by 0.07%.
The diff coverage is 71.20%.

@@            Coverage Diff             @@
##           master    #1492      +/-   ##
==========================================
+ Coverage   79.83%   79.91%   +0.07%     
==========================================
  Files          92       91       -1     
  Lines        4692     4765      +73     
  Branches      871      886      +15     
==========================================
+ Hits         3746     3808      +62     
+ Misses        673      667       -6     
- Partials      273      290      +17     
Impacted Files Coverage Δ
src/connection.ts 64.11% <71.20%> (+2.07%) ⬆️

... and 4 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants