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

SSE Error with gin adapter: "warning: unable to set write deadline" #491

Open
darrenparkinson opened this issue Jun 28, 2024 · 0 comments
Open

Comments

@darrenparkinson
Copy link

Hi,

Just looking to add SSE to an existing project that uses the gin router.

I'm using the example here but when I swap the router for Gin, I'm getting the error: warning: unable to set write deadline for every sent message.

e.g.

router := gin.Default()
api := humagin.New(router, huma.DefaultConfig("My API", "1.0.0"))

I notice this doesn't happen when using humago or humachi.

I can see that the error comes from this line here I think, but not sure what I'd need to do to fix that?

Is it because the gin context referenced in the adapter doesn't implement the SetWriteDeadline(time.Time) error function?

Any thoughts greatly appreciated.
Many thanks.

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

No branches or pull requests

1 participant