Gaurav Joshi - 2016-04-16

Hi,

I am trying to port Cyberlink in Android Aosp. I could add the jar files in aosp tree and compile my aosp source with these jar files.
I hava written a UpnpDevice Server class which sends notify root device request on the network. Server runs as a system service in android aosp which is started by systemserver when android device boots.
I am having following issue, when a control point discovers my android device, android device gets false connect requests from its own IP address continously in a loop. Due to this I can't send any action or control requests to android device from control point.

I have put prints to in accept to check from which ip connect requests are coming. I can see in logs that connect requests keeps on coming from my android device ip itself.
Due to so many connect requests the open file limit of kernel hits and I start getting TOO many files open error due to which all new socket connect/accept requests fails.

Any suggestions how to solve this?