rpc: set scheme for ws and ipc conns to the server#23615
Merged
holiman merged 4 commits intoethereum:masterfrom Sep 21, 2021
Merged
rpc: set scheme for ws and ipc conns to the server#23615holiman merged 4 commits intoethereum:masterfrom
holiman merged 4 commits intoethereum:masterfrom
Conversation
holiman
reviewed
Sep 21, 2021
| // Close closes the client, aborting any in-flight requests. | ||
| func (c *Client) Close() { | ||
| if c.isHTTP { | ||
| if c.scheme == HTTPConn { |
Contributor
There was a problem hiding this comment.
An alternative change would have been to hide this internaly, so instead of c.isHTTP {, you would have c.isHTTP() {
holiman
reviewed
Sep 21, 2021
Comment on lines
+63
to
+65
| HTTPConn = "http" | ||
| WSConn = "ws" | ||
| IPCConn = "ipc" |
Contributor
There was a problem hiding this comment.
Afaict, this is only used in the rpc package
Suggested change
| HTTPConn = "http" | |
| WSConn = "ws" | |
| IPCConn = "ipc" | |
| httpConn = "http" | |
| wsConn = "ws" | |
| ipcConn = "ipc" |
Contributor
|
Tested this a bit, seems to work as intended on |
yongjun925
pushed a commit
to DODOEX/go-ethereum
that referenced
this pull request
Dec 3, 2022
* rpc: set scheme for ws and ipc conns to the server * rpc: review fixes * rpc: bugfix * rpc: empty default scheme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #23593
Clef is reading out the request scheme from key "scheme" of the context. Scheme is being set for http requests in
go-ethereum/rpc/http.go
Line 244 in b61ef24