-
Notifications
You must be signed in to change notification settings - Fork 127
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
Detach-socket example? #175
Comments
I've opened #176 to correct the documentation. |
Got it, thanks Hans. I can confirm that That said, I'm still experiencing the connection being immediately closed when the handler returns, instead of being left open. Do you have any thoughts or suggestions on that? |
How do you determine that the connection is immediately closed? When I use
to send a request to the running server, I see that the connection stays open until Hunchentoot decides to close it because of a timeout. |
Hmm... I'm going off curl exiting, and the browser client I have set up reconnecting every 15 seconds. It seems like I'm probably missing something... would you be able to help me get to a minimal example of, say, a counter which sends an incrementing number to a set of sockets every few seconds? |
Here's a self-contained example, again using
|
Thank you! I'll play around with that and I believe I'll be able to get what I need. |
Greetings!
Minimal(ish) test case:
Then, run
curl -v -N -H 'Accept: text/event-stream' -H 'Connection: keep-alive' localhost:5000/test
My understanding, based on the documentation, is that the call to
detach-socket
should return the socket (which should be the same as the one returned bysend-headers
), and prevent Hunchentoot from closing the connection. Unfortunately... the connection still gets closed, and the format messages show thatdetach-socket
returns NIL.I suspect I'm misunderstanding something about how to use this function — could someone provide feedback, and/or add a simple example to the documentation?
Thanks!
The text was updated successfully, but these errors were encountered: