From 1633ae78e31b47ddd669b8c447d267ddc8fbeba5 Mon Sep 17 00:00:00 2001 From: Arndt Date: Sat, 31 May 2014 09:39:39 +0200 Subject: [PATCH] route-server patch for online instance --- .../java/btools/server/request/ProfileUploadHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/brouter-server/src/main/java/btools/server/request/ProfileUploadHandler.java b/brouter-server/src/main/java/btools/server/request/ProfileUploadHandler.java index 2267bfb..3cdd5e9 100644 --- a/brouter-server/src/main/java/btools/server/request/ProfileUploadHandler.java +++ b/brouter-server/src/main/java/btools/server/request/ProfileUploadHandler.java @@ -99,7 +99,10 @@ public class ProfileUploadHandler for(;;) { // read will block when false, occurs at end of stream rather than -1 - if (!ir.ready()) break; + if (!ir.ready()) { + try { Thread.sleep(1000); } catch( Exception e ) {} + if ( !ir.ready() ) break; + } int c = ir.read(); if ( c == -1) break; bw.write( c ); @@ -138,7 +141,7 @@ public class ProfileUploadHandler try { RoutingContext rc = new RoutingContext(); - rc.localFunction = new File( getOrCreateCustomProfileDir(), id ).getPath(); + rc.localFunction = serviceContext.customProfileDir + "/" + id; new RoutingEngine( null, null, null, null, rc ); } catch ( Exception e )