Solution for: #4: Paster restart socket error
Force all sockets to use the REUSEADDR flag
- 
 yliu on April 29, 2009, 12:06 PM UTC
  ....alternatively, you could go into /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/SocketServer.py, line 323:
and set it to True instead.
This will then affect line 341:
and force the application of the SO_REUSEADDR flag to any socket. This changes the fundamental way socket servers behave in Python, so it's kind of heavy-handed.
  
    
    
  
  
    
  
    
   
  allow_reuse_address = Falseand set it to True instead.
This will then affect line 341:
        if self.allow_reuse_address:
            self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)and force the application of the SO_REUSEADDR flag to any socket. This changes the fundamental way socket servers behave in Python, so it's kind of heavy-handed.
