Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring #81

Merged
merged 18 commits into from May 31, 2019
Merged

Refactoring #81

merged 18 commits into from May 31, 2019

Conversation

nhooyr
Copy link
Owner

@nhooyr nhooyr commented May 17, 2019

Closes #78

@codecov
Copy link

codecov bot commented May 17, 2019

Codecov Report

Merging #81 into master will decrease coverage by 1.4%.
The diff coverage is 78.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
- Coverage   82.35%   80.94%   -1.41%     
==========================================
  Files          10       10              
  Lines         731      824      +93     
==========================================
+ Hits          602      667      +65     
- Misses        108      128      +20     
- Partials       21       29       +8
Impacted Files Coverage Δ
accept.go 88.63% <100%> (+0.4%) ⬆️
dial.go 85% <100%> (+4.35%) ⬆️
statuscode.go 100% <100%> (+5.88%) ⬆️
websocket.go 77.66% <76.44%> (-4.98%) ⬇️
statuscode_string.go 37.03% <0%> (+11.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3eb559b...15b8365. Read the comment docs.

@nhooyr
Copy link
Owner Author

nhooyr commented May 30, 2019

This PR adds concurrent reads and massively simplifies the internals of the libraries 👏

@nhooyr nhooyr mentioned this pull request May 30, 2019
@nhooyr nhooyr changed the title Improve Close UX Refactoring May 30, 2019
@nhooyr
Copy link
Owner Author

nhooyr commented May 30, 2019

Figured out a clever way to merge readLoop and timeoutLoop into a single goroutine!

@nhooyr
Copy link
Owner Author

nhooyr commented May 30, 2019

Nvm I did not, I thought io.Reader was non blocking but it isn't. It blocks for at least a single read usually. So if we combine the two, then there is no way to get readLoop to wake up.

Don't want buggy code in master.
Closes #1 (Ping API)
Closes #62 (Read/Write convienence methods)
Closes #83 (SetReadLimit)
@nhooyr nhooyr force-pushed the fixes branch 2 times, most recently from 98bf7a1 to 4de9061 Compare May 30, 2019 07:14
@nhooyr nhooyr mentioned this pull request May 30, 2019
@nhooyr nhooyr requested a review from coadler May 30, 2019 22:21
@nhooyr
Copy link
Owner Author

nhooyr commented May 31, 2019

@coadler Definitely let me know how you feel about the additions to the API.

@coadler
Copy link
Contributor

coadler commented May 31, 2019

👍 will take a look tomorrow morning

Copy link
Contributor

@coadler coadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the additions.

(*Conn).Context will be very helpful

@coadler
Copy link
Contributor

coadler commented May 31, 2019

I'll test these out on my gateway later this weekend and let you know anything else I find

@nhooyr nhooyr merged commit 80689e3 into master May 31, 2019
@nhooyr nhooyr deleted the fixes branch May 31, 2019 19:51
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.

Improve Close UX
2 participants