When I leave my application I close the established TCP connection to my windows app:
protected override void OnStop() { ConnectionManager.CloseConnection