Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367485

Summary: HttpExchange canceled before response do not release connection
Product: [RT] Jetty Reporter: Simone Bordet <simone.bordet>
Component: clientAssignee: Simone Bordet <simone.bordet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: 7.6.0.RC0   
Target Milestone: 7.5.x   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Simone Bordet CLA 2011-12-23 05:43:59 EST
If an HttpExchange is sent and canceled before the response arrives, its correspondent connection is closed, but never released from HttpDestination._connection list.

This is bad if the number of connections is limited (e.g. HttpClient.maxConnectionsPerAddress == 1) because no other exchange can be sent: the HttpDestination will wait for someone to release a connection, but this never happens.
Comment 1 Simone Bordet CLA 2011-12-23 05:52:49 EST
Fixed. Now we return the connection when we close it, so that the connection will be released.