Skip to main content
Participant
August 8, 2011
Question

AIR Application - problems with Network connections using AMFChannels. Not closing TCP ports

  • August 8, 2011
  • 2 replies
  • 1617 views

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

This topic has been closed for replies.

2 replies

RaaaaasiAuthor
Participant
August 17, 2011

bug raised for this issue. Please vote if you face the same issue. https://bugbase.adobe.com/index.cfm?event=bug&id=2944670

chris.campbell
Legend
August 8, 2011

Hi Sasi,

I'm not sure about this so I'll forward this along to our network folks to see if they have any input.  A couple of additional suggestions:

If you believe this is a bug, would you mind opening a bug report for this over at bugbase.adobe.com?  Please post back with the bug URL so others affected can cast their votes and add comments.

I'd also like to recommend reposting this over on the Flex forums.  You might find others that have encountered this problem who are willing to comment.

Thanks,

Chris

RaaaaasiAuthor
Participant
August 8, 2011

Thanks Chris, I will report this in the Bug report

Participant
August 10, 2011

#1 AIR is not detecting ChannelFault if the network disconnection is because of the Server Failure or Switch goes down, Server cable unplugged.

     

    - This is as designed, and your solution is correct. The change events are thrown in response to changes in network interfaces,and do not directly related to the viability of the network connection. (For that, polling services are required and provided.) " .

#2 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.

       - We'd suggest to close the port manually in code once detecting the socket connection is not available and try to rebuild connection once the net connection is available