Revision: 18570
http://sourceforge.net/p/gate/code/18570
Author: ian_roberts
Date: 2015-02-12 16:10:40 +0000 (Thu, 12 Feb 2015)
Log Message:
-----------
Ensure the object output stream is properly recreated even in cases where
there's a communication error pushing the buffer to the server, otherwise the
whole MimirConnector grinds to a halt.
Modified Paths:
--------------
mimir/trunk/mimir-client/src/gate/mimir/index/MimirConnector.java
Modified: mimir/trunk/mimir-client/src/gate/mimir/index/MimirConnector.java
===================================================================
--- mimir/trunk/mimir-client/src/gate/mimir/index/MimirConnector.java
2015-02-12 02:19:50 UTC (rev 18569)
+++ mimir/trunk/mimir-client/src/gate/mimir/index/MimirConnector.java
2015-02-12 16:10:40 UTC (rev 18570)
@@ -189,9 +189,12 @@
// second phase - post to the URL we were given
// close the object OS so that it writes its coda
objectOutputStream.close();
- webUtils.postData(postUrlBuilder.toString(), byteBuffer);
- byteBuffer.reset();
- objectOutputStream = new ObjectOutputStream(byteBuffer);
+ try {
+ webUtils.postData(postUrlBuilder.toString(), byteBuffer);
+ } finally {
+ byteBuffer.reset();
+ objectOutputStream = new ObjectOutputStream(byteBuffer);
+ }
}
lastWrite = System.currentTimeMillis();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs