AIR Application - problems with Network connections using AMFChannels. Not closing TCP ports
Hi
We are developing an AIR application using the Flex 4.1 SDK. We use AMFChannel to connect to the server for using the RemoteObject Services and the long polling. We have observed a problem when the network goes down, we are not getting the channel fault at the Client end. If we loose the network connectivity on the client machine, yes AIR detects immediately. AIR is not detecting ChannelFault if the network disconnection is because of the Server Failure or Switch goes down, Server cable unplugged.
We found two different solutions to detect this, One Solution is by using the SocketMonitor (This is not as same as given on the Adobe site http://livedocs.adobe.com/flex/3/html/help.html?content=network_connec tivity_1.html, we had to write a timer to check the connectivity as we didn’t get the StatusEvent.STATUS event generated). Other solution was to detect the long polling time out, so that we can treat that server is not reachable on any long polling timeout.
We have another problem identified after fixing this as above. Once AIR gets disconnected from Server, the client ports (TCP sockets) not getting closed. As those are not getting closed, though the server is back, when AIR tries to reach the Server, it keeps using the old sockets, where the Server would have closed the sockets already. So AIR sends packets on the old sockets, Server never gets the requests. Always the AMF requests time out.
I think AIR Runtime is supposed to retry to send the TCP Fin to the server if the TCP socket is non-usable and close the port with some time out. I don’t see that handshake on the network. Did anybody face this problem? Do you have any suggestions?
Is the above issue with the TCP Keep alive? Some thing to be enabled at the Server end to make sure the TCP Keep alive going as expected?
Please let us know if any one know that this is fixed in SDK 4.5. (** We didn’t want to migrate to 4.5 now as we have come across some other issues with it)
Thanks in advance
Sasi
