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

src/debugAdapter: adds error handling for remote connections #216

Closed
wants to merge 1 commit into from

Conversation

vjocw
Copy link
Contributor

@vjocw vjocw commented Jun 11, 2020

json-rpc2 module doesn't catch all the errors in its callback. If a remote connection fails to be established, it won't call the callback for errors. So the connection will hang. There are no future plans to handle the error case through the callback: json-rpc2: pocesar/node-jsonrpc2#53. Node.js handles errors in a similar way: https://nodejs.org/api/net.html#net_socket_connect. Errors won't be exposed through the callback, only through the error listener.

Fixes #215

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Jun 11, 2020
@vjocw vjocw changed the title This change adds error handling for remote connections adds error handling for remote connections Jun 11, 2020
@gopherbot
Copy link
Collaborator

This PR (HEAD: 44d9b59) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/237559 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://golang.org/doc/contribute.html#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.


Please don’t reply on this GitHub thread. Visit golang.org/cl/237559.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 1:

(2 comments)

Thanks for finding the bug and offering the fix for it.


Please don’t reply on this GitHub thread. Visit golang.org/cl/237559.
After addressing review feedback, remember to publish your drafts!

@hyangah
Copy link
Contributor

hyangah commented Jun 11, 2020

@vincentjocodes Just in case the comment is not visible - the actual review happens in https://golang.org/cl/237559. Thanks again!

@vjocw vjocw changed the title adds error handling for remote connections src/debugAdapter: adds error handling for remote connections Jun 12, 2020
@gopherbot
Copy link
Collaborator

Message from Vincent Jo:

Patch Set 4:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/237559.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Jun 12, 2020
json-rpc2 module doesn't catch all the errors in its callback. If a remote connection fails to be established, it won't call the callback for errors. So the connection will hang. There are no future plans to handle the error case through the callback: json-rpc2: pocesar/node-jsonrpc2#53. Node.js handles errors in a similar way: https://nodejs.org/api/net.html#net_socket_connect. Errors won't be exposed through the callback, only through the error listener.

Fixes #215

Change-Id: I75cfb2a0cf6628a8c35ddccf8c96ec1ade0275f1
GitHub-Last-Rev: 44d9b59
GitHub-Pull-Request: #216
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/237559
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@gopherbot
Copy link
Collaborator

This PR is being closed because golang.org/cl/237559 has been merged.

@gopherbot gopherbot closed this Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debug: show errors when remote connection fails
4 participants