Re: Client exit handling. Is there an example?
Irmen de Jong <[email protected]>
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
On 15-6-2013 13:50, Irmen de Jong wrote: > > A possible implementation is here: https://gist.github.com/irmen/5787860 > Notice that the server object requires a special 'ping' method to exist for this to work. > > I might look into a nicer way to do this in the near future. Footnote: The code there is also not very efficient; it now requires two remote calls for every method invocation on the proxy. Perhaps it can be improved to not use the 'ping' method and simply retrying the actual method if that fails. The problem with that is unfortunately we have no way of knowing if the first call was received and processed by the server and the disconnect happened only after that (before receiving the response). Calling the same method again after reconnecting might result in the method being invoked twice in the server, and that's usually not what you want to happen. Dealing with unreliable networks is hard :( Irmen ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev