-
Notifications
You must be signed in to change notification settings - Fork 75
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
Server side connection close panic fix #44
Conversation
Thanks for looking into this! I'm a bit hesitant to merge this though. In particular, the |
e072f44
to
942a9d4
Compare
Just cosmetic changes to unify self reference variable name across all *Conn methods + NewConnNet comment fix This commit makes no changes in logic
7dae864
to
238d57f
Compare
I made some changes to PR to group changes by type and improve readability for review. @BurntSushi I have a question. If I provide additional information, why the window-example failed and describe all the changes I have made with explanations, why I made them and why the changes do not break your logic and can not break other projects or introduce new bugs, but even fix some issues (e.g fixes #32) ... is there a possibility you accept this PR? I don't really care if you accept, I have a fork, that I use & work on/with, but this repo really helped me and I want to contribute as thanks. |
@jezek I do appreciate the contribution. I'm sorry that the test suite isn't in a place that allows me to be confident enough to merge this PR. If you could explain the changes and the problem, that would be great. I will then try out your patch as part of my WM as a form of manual quality assurance, and then I think I would be OK merging. |
de0e3c2
to
7ed4845
Compare
7ddc162
to
f2f644f
Compare
fix double close panic, fix occaional panic on sudden connection to server close handle all channel waitings in cookies and requests properly
f2f644f
to
67a5ab1
Compare
Sorry, for the long pause. I began to wrote my review and spotted a flaw in my PR, so I ended up fixing it and writing some tests (#45). In following lines I will try to explain the changes and flaws they are fixing. In Why? The original meaning of The unfinished business part is provided by the But there is a flaw in the signaling/responding logic. Imagine, the This doesn't mater now, cause the signaling is handled a little bit different. The problem is the In In In In The changes in Changes in In There are two new defers. The connection close defer (line 362) is for unblocking the The for loop through incoming request channel Before changes, the graceful close request was signaled via the All other changes in loop are error handling changes. Note: in case of unsuccessful write (line 391) we now return before In The checking for closing (line 393) is no more needed, signaling is done in different way. After first On next All other logic is untouched. To the switch in All the changes in |
fcb8d7b
to
6e911a2
Compare
Rewrite spawning of go routines upon new connection, so we can signal them and wait for them on connection close.
This fixes e.g. a panic in window example after window close:
to