@Override public void releaseConnection(){
  Header header=getResponseHeader("content-type");
  if (header != null) {
    String contentTypeHeader=header.getValue();
    if (contentTypeHeader != null && contentTypeHeader.equals("text/event-stream")) {
      return;
    }
  }
  super.releaseConnection();
}

@ Override public void releaseConnection ( ) { Header header = getResponseHeader ( "content-type" ) ; if ( header != null ) { String contentTypeHeader = header . getValue ( ) ; if ( contentTypeHeader != null && contentTypeHeader . equals ( "text/event-stream" ) ) { return ; } } super . releaseConnection ( ) ; }
avoid releasing connection on event stream that is used in server - sent events .
