Changeset 34977 in project


Ignore:
Timestamp:
01/01/18 19:28:09 (12 months ago)
Author:
sjamaan
Message:

http-client: Close the connection object, not the URI object

This prevents leaking lots and lots of file descriptors when the
reader raises an exception, because we haven't run cleanup! yet, which
means the uri isn't registered in idle-connections. In turn, this
means we can't close the connection!

This happens a lot when a caller creates lots of 400 class errors
(like 404), which cause an exception to be raised.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/http-client/trunk/http-client.scm

    r34769 r34977  
    715715           ;; (the error could have occurred while reading, so there
    716716           ;;  might be data left in the buffer)
    717            (close-connection! uri)
     717           (close-connection! con)
    718718           (raise exn))))))
    719719
Note: See TracChangeset for help on using the changeset viewer.