-
Notifications
You must be signed in to change notification settings - Fork 147
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
Add websockets v2 #1978
Add websockets v2 #1978
Conversation
default: | ||
p.log.Warnf("dropping websocket message for %s", r.RemoteAddr) | ||
if err := client.Send(ctx, event); err != nil { | ||
p.log.Warnf("error sending message: %v", err) |
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.
maybe add the info to which client ID the send failed.
|
||
var command SubscriptionCommand | ||
if err := json.Unmarshal(message, &command); err != nil { | ||
p.log.Warnf("Could not deserialize message to type ControlCommand, msg: '%v'", message) |
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.
you will print a byte slice here as a log message. better encode it to hex before.
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.
And add the info about the client.
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.
The requested changes will be made later on by @lmoe
Description of change
Adds a new websocket to the webapi.
To be found on
ws://api.wasphost/ws
Supports subscribing to message topics
Supports subscribing to chains (either all, or selected)
Links to any relevant issues
fixes issue #1414