Skip to content

Commit

Permalink
Use synchronous, not asynchronous XML-RPC calls, because asynch cause…
Browse files Browse the repository at this point in the history
…s trouble

git-svn-id: file:///mbt/data/jsamp/svn-mirror/trunk/astrogrid/samp@26977 d07e2994-6e00-4123-b050-8522f38abc7a
  • Loading branch information
mbtaylor committed Feb 14, 2011
1 parent 920df3f commit 764a76e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/java/org/astrogrid/samp/xmlrpc/XmlRpcCallableClient.java
Expand Up @@ -78,6 +78,15 @@ private void exec( String methodName, Object[] params )
* @param paramList list of method parameters
*/
private void rawExec( String fqName, List paramList ) throws IOException {
xClient_.callAndForget( fqName, paramList );

// callAndForget might seem adequate here. However, any implementation
// I've come up with for it presents problems (for instance incomplete
// HTTP connections when run from a shutdown hook thread,
// so hub fails to warn all clients of impending shutdown, though
// hacks around this are possible).
// It seems least problematic, and not dramatically slower,
// just to do synchronous calls here. This could cause trouble
// if clients hang onto HTTP connections for long though.
xClient_.callAndWait( fqName, paramList );
}
}

0 comments on commit 764a76e

Please sign in to comment.