Skip to content

Conversation

hzxuzhonghu
Copy link

I found this when doing test with httptest, it doesnot support CloseNotify at all.

  • With pull requests:
    • Open your pull request against master
    • Your pull request should have no more than two commits, if not you should squash them.
    • It should pass all tests in the available continuous integration systems such as GitHub Actions.
    • You should add/modify tests to cover your proposed code changes.
    • If your pull request contains a new feature, please document it on the README.

I found this when doing test with httptest, it doesnot support CloseNotify at all.
@hzxuzhonghu
Copy link
Author

@appleboy can you please take a look

@@ -1242,7 +1242,7 @@ func (c *Context) SSEvent(name string, message any) {
// indicates "Is client disconnected in middle of stream"
func (c *Context) Stream(step func(w io.Writer) bool) bool {
w := c.Writer
clientGone := w.CloseNotify()
Copy link
Author

Choose a reason for hiding this comment

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

w io.Writer does not implement CloseNotify

@hzxuzhonghu
Copy link
Author

ping @appleboy can you take a look

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

Successfully merging this pull request may close these issues.

1 participant