[Twisted-Python] remove a tcp.Port

Maj-Britt Bruheim bruheim at c2i.net
Sat Sep 1 10:49:48 MDT 2001


Hello, 

The first bug I ran into with twisted.ftp is that after 15 tcp.Ports has been opened and closed, skt.Listen starts to fail. This is due to the fact that when calling Port.loseConnection, the actual code called is Server.loseConnection which does not removeReader (actually, the Port.loseConnection is broken, since it calls removeReader and not main.removeReader). Well, there's seems to be two types of behaviour intended with the code, and of course, calling a loseConnection to the server shouldn't remove it entirely, but there should be a function doing that. Another thing, the limit for maximum Ports, where is it? And can shouldn't it be configurable?

And here follows the somewhat confusing traceback. Note that this is upon re-connecting the ftp-server. When the client can't connect to the server, there's nothing on the log.
01/09/2001 18:38 [FTP,1,127.0.0.1] Traceback (most recent call last):
01/09/2001 18:38 [FTP,1,127.0.0.1] File "c:\dev\twisted\twisted\internet\main.py", line 267, in doSelect
01/09/2001 18:38 [FTP,1,127.0.0.1] why = getattr(selectable, method)()
01/09/2001 18:38 [FTP,1,127.0.0.1] File "c:\dev\twisted\twisted\internet\tcp.py", line 82, in doRead
01/09/2001 18:38 [FTP,1,127.0.0.1] return self.protocol.dataReceived(data)
01/09/2001 18:38 [FTP,1,127.0.0.1] File "c:\dev\twisted\twisted\protocols\ftp.py", line 590, in dataReceived
01/09/2001 18:38 [FTP,1,127.0.0.1] self.processLine(line)
01/09/2001 18:38 [FTP,1,127.0.0.1] File "c:\dev\twisted\twisted\protocols\ftp.py", line 583, in processLine
01/09/2001 18:38 [FTP,1,127.0.0.1] n = method(params)
01/09/2001 18:38 [FTP,1,127.0.0.1] File "c:\dev\twisted\twisted\protocols\ftp.py", line 433, in ftp_Pasv
01/09/2001 18:38 [FTP,1,127.0.0.1] self.createPassiveServer()
01/09/2001 18:38 [FTP,1,127.0.0.1] File "c:\dev\twisted\twisted\protocols\ftp.py", line 379, in createPassiveServer
01/09/2001 18:38 [FTP,1,127.0.0.1] self.dtpPort.startListening()
01/09/2001 18:38 [FTP,1,127.0.0.1] File "c:\dev\twisted\twisted\internet\tcp.py", line 297, in startListening
01/09/2001 18:38 [FTP,1,127.0.0.1] skt.listen(self.backlog)
01/09/2001 18:38 [FTP,1,127.0.0.1] File "<string>", line 1, in listen
01/09/2001 18:38 [FTP,1,127.0.0.1] error: (10055, 'No buffer space available')







More information about the Twisted-Python mailing list