0

I have a method on a WCF proxy which returns void. If the return was non-void, I'd need to call the corresponding End... method to get the result, but what if the return is void?

Eg:

    ModuleProxy.Instance.Controller.BeginSaveConfiguration(Module.Name, Proxy_EndSaveConfig, null);
    ...
}

private void Proxy_EndSaveConfig(IAsyncResult ar) {
    ModuleProxy.Instance.Controller.EndSaveConfiguration(ar);
}

I I just pass a null callback then never call EndSaveConfiguration, will the proxy hold on to something or end up in a weird state eventually?

Echilon
  • 10,064
  • 33
  • 131
  • 217

1 Answers1

0

Normally your asynchronous request should time out. The default value it is 10 minutes. If you want to decrease it change the binding configuration for it to a lower value.

Mihai H
  • 3,291
  • 4
  • 25
  • 34
  • Yes but does not calling the End method have any negative impact? – Echilon Jul 02 '12 at 07:33
  • No it does not since your operation runs in a separate thread. The only issue you might bump into is if you have a high number of incoming request then the number of threads will really flourish. In order to counter this effect change the time out to smaller value (if your operation does not performs really long running tasks). – Mihai H Jul 02 '12 at 07:38