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

[refactor] use AddEventListener check instead of OnMessage check #989

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

vegetablechicken233
Copy link

Use "len(es.onEvent) == 0 " check instead of "if _, found := es.onEvent[defaultEventName]" check.

Sometimes the implementation of the sse server is not standard, and there is no event with the type of message.
In my opinion, users should be able to use it as long as they have added any eventListener.

Separated from PR #985

Copy link
Member

@jeevatkm jeevatkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vegetablechicken233 Thanks for the PR.

@jeevatkm
Copy link
Member

@vegetablechicken233, there is a test case failure, please fix.
https://github.com/go-resty/resty/pull/989/checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants