Fix the following exception occurring with test_quick_connect():
Fix the following exception occurring with test_quick_connect():

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/home/giampaolo/svn/pyftpdlib/test/test_ftpd.py", line 225, in run
    use_poll=self.__use_poll)
  File "build/bdist.linux-x86_64/egg/pyftpdlib/ftpserver.py", line 3689, in serve_forever
    poll_fun(timeout)
  File "/usr/lib/python2.7/asyncore.py", line 156, in poll
    read(obj)
  File "/usr/lib/python2.7/asyncore.py", line 87, in read
    obj.handle_error()
  File "build/bdist.linux-x86_64/egg/pyftpdlib/ftpserver.py", line 820, in handle_error
    logerror(traceback.format_exc())
  File "/usr/lib/python2.7/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/usr/lib/python2.7/asyncore.py", line 439, in handle_read_event
    self.handle_accept()
  File "build/bdist.linux-x86_64/egg/pyftpdlib/ftpserver.py", line 800, in handle_accept
    handler = self.cmd_channel.dtp_handler(sock, self.cmd_channel)
  File "build/bdist.linux-x86_64/egg/pyftpdlib/contrib/handlers.py", line 281, in __init__
    self.secure_connection(self.cmd_channel.ssl_context)
  File "build/bdist.linux-x86_64/egg/pyftpdlib/contrib/handlers.py", line 99, in secure_connection
    self.socket = SSL.Connection(ssl_context, self.socket)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
  File "/usr/lib/python2.7/socket.py", line 170, in _dummy
    raise error(EBADF, 'Bad file descriptor')
error: [Errno 9] Bad file descriptor



giampaolo/pyftpdlib