title: How to close urllib2 connection?
body: <p>I have made a program using urllib2 that makes a lot of connections across the web. I noticed that eventually that this can be DDoS worthy; I would like to know how to close down each connection after I have done my business to prevent such an attack.</p>
  
  <p>The code I am using to open a connection is:</p>
  
  <pre><code>cj = cookielib.CookieJar()
  opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
  r = opener.open("http://www.python.org)
  html = r.read()
  </code></pre>