chmouel/ftp-cloudfs — pull request #35 by sirkonst (2012-09-12 10:55:36+00:00)
Title: Fixed and improved handling max_cons_per_ip.

Fixed trace:
```
2012-09-11 10:25:36,592 - ERROR - []@127.0.0.1:59672 Connection tracking failed:
---------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.6/multiprocessing/managers.py", line 216, in serve_client
obj, exposed, gettypeid = id_to_obj[ident]
KeyError: '7f0ac0c02228'
---------------------------------------------------------------------------
2012-09-11 10:25:36,593 - ERROR - []@127.0.0.1:59672 unhandled exception in instance
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/pyftpdlib/ftpserver.py", line 3810, in handle_accept
handler.handle()
File "/usr/lib/pymodules/python2.6/ftpcloudfs/monkeypatching.py", line 69, in handle
self.logline("Connection track: %s -> %s" % (self.remote_ip, count+1))
UnboundLocalError: local variable 'count' referenced before assignment
```

And moved handling max_cons_per_ip from FTPServer to MyFTPHandler. Without it sometime FTP can accept more then max_cons_per_ip (tested by telnet).