closes Issue #11199: Fix the with urllib which hangs on particular ftp urls.
diff --git a/Lib/urllib/response.py b/Lib/urllib/response.py
index 8c6dcca..ffaa5fa 100644
--- a/Lib/urllib/response.py
+++ b/Lib/urllib/response.py
@@ -61,11 +61,11 @@
         self.hookargs = hookargs
 
     def close(self):
-        addbase.close(self)
         if self.closehook:
             self.closehook(*self.hookargs)
             self.closehook = None
             self.hookargs = None
+        addbase.close(self)
 
 class addinfo(addbase):
     """class to add an info() method to an open file."""