hi everyone,

still working on my ftp service server.

i have a strange behavior :
i use my ftp server to build "on the fly" a file made of int64 if the file 
='IMAGES'.
if this condition is met, i use the thread process as mentioned in previous mail
in order not to block the main thread and send the result once it's ready.

my problem is that without knowing why, sometimes, the server gets a client 
disconnection
although my client code doesn't mention it !

here's a log with timestamps of what happens (sorry for the inconvenience of 
readbility) :

[2005/05/19 18:04:21.906] FTP Listening on Port : 2222
[2005/05/19 18:04:43.843] FTP : connection from 192.168.0.49
[2005/05/19 18:04:44.078] FTP : answer to 192.168.0.49 : 331 Password required 
for 1.
[2005/05/19 18:04:44.281] FTP : answer to 192.168.0.49 : 230 User 1 logged in.
[2005/05/19 18:04:44.359] FTP : answer to 192.168.0.49 : 227 Entering Passive 
Mode (192,168,0,49,144,136).
[2005/05/19 18:04:44.437] FTP : BeginOfThread Thread Creation File : IMAGES
[2005/05/19 18:04:44.515] FTP : BeginOfThread Resumed
[2005/05/19 18:04:44.515] FTP : InThread File to process : IMAGES
[2005/05/19 18:04:44.656] FTP : BeginOfThread DelayedSend=True
Problem from here ==> [2005/05/19 18:04:44.734] FTP : answer to 192.168.0.49 : 
150 Opening data connection for IMAGES.
[2005/05/19 18:04:44.968] FTP : answer to 192.168.0.49 : 226 File sent ok
[2005/05/19 18:04:45.046] FTP : answer to 192.168.0.49 : 221 Goodbye.
To Here ==>[2005/05/19 18:04:45.156] FTP : deconnection from 192.168.0.49
[2005/05/19 18:04:45.328] FTP : InThread General Exception (Client=Nil)
[2005/05/19 18:04:45.328] FTP : connection from 192.168.0.49
[2005/05/19 18:04:45.484] FTP : EndOfThread Exception (client=Nil)
[2005/05/19 18:04:45.578] FTP : answer to 192.168.0.49 : 331 Password required 
for 1.
[2005/05/19 18:04:45.703] FTP : answer to 192.168.0.49 : 230 User 1 logged in.
[2005/05/19 18:04:45.781] FTP : answer to 192.168.0.49 : 227 Entering Passive 
Mode (192,168,0,49,144,136).
[2005/05/19 18:04:45.890] FTP : BeginOfThread Thread Creation File : IMAGES
[2005/05/19 18:04:46.000] FTP : BeginOfThread Resumed
[2005/05/19 18:04:46.015] FTP : InThread File to process : IMAGES
[2005/05/19 18:04:46.156] FTP : BeginOfThread DelayedSend=True
And again from here ==> [2005/05/19 18:04:46.234] FTP : answer to 192.168.0.49 
: 150 Opening data connection for IMAGES.
[2005/05/19 18:04:46.406] FTP : answer to 192.168.0.49 : 226 File sent ok
[2005/05/19 18:04:46.500] FTP : answer to 192.168.0.49 : 221 Goodbye.
to here ==> [2005/05/19 18:04:46.593] FTP : deconnection from 192.168.0.49
[2005/05/19 18:04:46.718] FTP : InThread General Exception (Client=Nil)
[2005/05/19 18:04:46.718] FTP : connection from 192.168.0.49
[2005/05/19 18:04:46.984] FTP : EndOfThread Exception (Client=Nil)
[2005/05/19 18:04:47.093] FTP : answer to 192.168.0.49 : 331 Password required 
for 1.
[2005/05/19 18:04:47.203] FTP : answer to 192.168.0.49 : 230 User 1 logged in.
[2005/05/19 18:04:47.312] FTP : answer to 192.168.0.49 : 227 Entering Passive 
Mode (192,168,0,49,144,136).
[2005/05/19 18:04:47.406] FTP : BeginOfThread Thread Creation File : IMAGES
[2005/05/19 18:04:47.500] FTP : BeginOfThread Resumed
[2005/05/19 18:04:47.515] FTP : InThread File to process : IMAGES
[2005/05/19 18:04:47.640] FTP : BeginOfThread DelayedSend=True
Last from here ==> [2005/05/19 18:04:47.718] FTP : answer to 192.168.0.49 : 150 
Opening data connection for IMAGES.
[2005/05/19 18:04:47.953] FTP : answer to 192.168.0.49 : 226 File sent ok
[2005/05/19 18:04:48.031] FTP : answer to 192.168.0.49 : 221 Goodbye.
To here==> [2005/05/19 18:04:48.109] FTP : deconnection from 192.168.0.49
[2005/05/19 18:04:48.296] FTP : InThread General Exception (Client=Nil)
[2005/05/19 18:04:48.531] FTP : EndOfThread Exception (Client=Nil)

The exceptions are triggered because the Client used within the thread is nil.
what i don't understand is why, although i set delayedsend to true,
the ftp server begins to open the data connection and says the file is sent ?

any clue ?

Guillaume MAISON
-----
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
TÚl : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to