-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
rpc: set scheme for ws and ipc conns to the server #23615
Conversation
rpc/client.go
Outdated
@@ -250,7 +273,7 @@ func (c *Client) SupportedModules() (map[string]string, error) { | |||
|
|||
// Close closes the client, aborting any in-flight requests. | |||
func (c *Client) Close() { | |||
if c.isHTTP { | |||
if c.scheme == HTTPConn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative change would have been to hide this internaly, so instead of c.isHTTP {
, you would have c.isHTTP() {
rpc/client.go
Outdated
HTTPConn = "http" | ||
WSConn = "ws" | ||
IPCConn = "ipc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaict, this is only used in the rpc
package
HTTPConn = "http" | |
WSConn = "ws" | |
IPCConn = "ipc" | |
httpConn = "http" | |
wsConn = "ws" | |
ipcConn = "ipc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work!
Tested this a bit, seems to work as intended
on
|
* rpc: set scheme for ws and ipc conns to the server * rpc: review fixes * rpc: bugfix * rpc: empty default scheme
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