On Sun, 2011-01-23 at 21:28 +0000, Mark Ellis wrote: > I actually have no idea how to fix it at the moment, but I know exactly > why it happens. When a device connects, we open a listening tcp server > on port 990 and 5679, the first is for WM5 and the second is for > 'legacy'. We do both because we dont know what kind it is yet. When the > Wm2003 device connects to port 5679, we close the server on 990 because > we don't need it. > > But it doesn't close on 990, so when the device is unplugged and > replugged, we again open both servers, but 990 failed to close, so when > we try and open it we get an error. > > I've gone right down to trying to close the file descriptor manually, no > good. It's bound to be something obvious. Anyone that spots it gets to > be King of Synce !!!!!!
can you run netstat and see what state the port is in after unplugging the device? I'm a little rusty on my socket programming... -- Iain Buchanan <iaindb at netspace dot net dot au> Lackland's Laws: (1) Never be first. (2) Never be last. (3) Never volunteer for anything ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ SynCE-Devel mailing list SynCE-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synce-devel