可以是indy的一个bug(200分)

M

maxwel

Unregistered / Unconfirmed
GUEST, unregistred user!
问题是我用indy的ftp组件写了一个ftp程序,在测试上传的时候,
它是正在上传的,我就用abort命令取消上传,
它就弹出个出错信息"Connection closed Gracefully",
之后就不能再做其它操作了,只有断开再连接才正常.
 
Indy的TIDxxxxConnection的Connected属性只是表示Socket的Handle不是非法,他实际上并不能反映网络的通断情况,所以我自己写了线程来检查网络的实际通断情况。
另外Disconnect做的事情里面有一件就是吧Socket的Handle设置为INVALID_SOCKET

Connect方法作的事情里面包括申请Socket的Handle,然后差不多就把Connected属性改成true了
**** Indy
 
我还是不明白,你可以发个实例给我看吗,要做到取消上传而无出问题的,我的电邮maxwell@dg163.com
 
就弹出个出错信息"Connection closed Gracefully",
你应该就调用disconnect,因为这个时候Indy不会吧Connected设置为False的
 
那如何阻止这个出错信息的弹出
 
我晕...
try就是了吧
 
不行啊,这个我也试过,如果你可以,你可以把无出错的源代码发给我吗,谢谢,我的EMAIL:maxwells@1010.com
 
我试过,这个有BUG,不能用,得用ics的
 
请问哪里有ICS下载,你有吗,可以发个给我吗,我急着用,我的E-MAIL:maxwell@dg163.com,谢谢
 
装D7就没问题!升级Indy都有问题,不知是Borland的问题还是Indy的问题
 
偶用的就是Delphi7也是有这个问题Connection closed Gracefully,ft,不知道怎么解决!
太可恶了,现在borland到底在搞什么啊!
 
我也遇到了,谁来说怎么解决呀?
 
checkfordisconnect
CheckForGracefulDisconnect应该能解决,

原来直接是DISCONNECT,现在改成比就可以了:
CheckForGracefulDisconnect(false);
if Connected then Disconnect;

------ If you receive an exception here, please read. ----------

If this is a SERVER
-------------------
The client has disconnected the socket normally and this exception is used to notify the
server handling code. This exception is normal and will only happen from within the IDE, not
while your program is running as an EXE. If you do not want to see this, add this exception
or EIdSilentException to the IDE options as exceptions not to break on.

From the IDE just hit F9 again and Indy will catch and handle the exception.

Please see the FAQ and help file for possible further information.
The FAQ is at http://www.nevrona.com/Indy/FAQ.html

If this is a CLIENT
-------------------
The server side of this connection has disconnected normaly but your client has attempted
to read or write to the connection. You should trap this error using a try..except.
Please see the help file for possible further information.

// ************************************************************* *)
raise EIdConnClosedGracefully.Create(RSConnectionClosedGracefully);
 
我也遇到这个问题了,急需解决!上面的语句放在哪啊?
 
顶部