Not a bug, but possibly a missing addendum to the documentation.

The docs say that MG_CLOSE is invoked when the connection is being closed. 
However, in error situations (e.g. when MG_HTTP_ERROR is invoked), once the 
response is sent out the connection is closed but MG_CLOSE is not invoked.

Not a big deal because this seems to only happen when you tell Mongoose to 
handle the request itself. However if you put something in connection_param 
before you did that, the documentation leads you to believe that you can 
use MG_CLOSE to clean it up, which doesn't seem to be the case.

Also, just as an aside, is there a good reason to not have a way for the 
handling code to indicate that it thinks the connection should be closed? 
For example if you were waiting for a database transaction to finish and 
you decided that it would be better to time out the connection early and 
close it rather than keep waiting. I know you can change what the idle 
timeout value is, but that is then for every request.

I guess you could also have MG_POLL return TRUE, but then you're at the 
mercy of the polling interval of the server.

-- 
You received this message because you are subscribed to the Google Groups 
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to