On 22.06.2011 21:00, Stephan Knauss wrote:
For me it looks like it got stuck inside some method checking the
server state. How is it supposed to handle network timeouts and such
things?
is osmosis setting a timeout at all? Is there any global setting in
effect? getConnectTimeout() could return a value. In case this is 0 it's
the problem we all experience with it waiting infinitely.
I guess it's this code:
http://svn.openstreetmap.org/applications/utils/osmosis/trunk/replication/src/org/openstreetmap/osmosis/replication/common/ServerStateReader.java
stateStream = stateUrl.openStream();
according to Javadoc it's a shorthand for
openConnection().getInputStream()
I propose to replace this with
URLConnection connection = stateUrl.openConnection();
connection.setReadTimeout(15*60*1000); // timeout 15 minutes
connection.setConnectTimeout(15*60*1000); // timeout 15 minutes
stateStream = connection.getInputStream();
Could this be tested by someone more familiar with the code than I am?
Stephan
_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev