Community
Participate
Working Groups
This can be reproduced by the following test: @Test public void testFectchOrphanedThreads() throws Exception { int timeoutSeconds = 5; Repository db = createWorkRepository(); SshTransport t = (SshTransport) Transport.open(db, "<ssh url, where connection is successful, but repository is not found>"); t.setTimeout(timeoutSeconds); try { FetchConnection fc = t.openFetch(); } catch (Exception e) { //it's OK t.close(); } try { Thread.sleep(timeoutSeconds * 1000); } catch (InterruptedException e) { // ignore } boolean copyThreadTerminated = true; for (Thread thread : Thread.getAllStackTraces().keySet()) { if (thread.getName().endsWith("-StreamCopy")) copyThreadTerminated = false; } assertTrue("Copy thread wasn't terminated", copyThreadTerminated); } A possible fix is attached.
Created attachment 221089 [details] A possible fix