Pārlūkot izejas kodu

Fixed GitDaemon stop for unit tests

tags/v1.3.0
James Moger pirms 11 gadiem
vecāks
revīzija
2e4b03f7fe
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5
    3
      src/main/java/com/gitblit/git/GitDaemon.java

+ 5
- 3
src/main/java/com/gitblit/git/GitDaemon.java Parādīt failu

// //
} finally { } finally {
acceptSocket = null; acceptSocket = null;
acceptThread = null;
} }
} }
}; };
acceptThread.start(); acceptThread.start();
/** Stop this daemon. */ /** Stop this daemon. */
public synchronized void stop() { public synchronized void stop() {
if (acceptThread != null) {
logger.info("Git Daemon stopping...");
if (isRunning() && acceptThread != null) {
run.set(false); run.set(false);
logger.info("Git Daemon stopping...");
try { try {
// close the accept socket // close the accept socket
// this throws a SocketException in the accept thread // this throws a SocketException in the accept thread
logger.info("Git Daemon stopped."); logger.info("Git Daemon stopped.");
} catch (InterruptedException e) { } catch (InterruptedException e) {
logger.error("Accept thread join interrupted", e); logger.error("Accept thread join interrupted", e);
} finally {
acceptThread = null;
} }
} }
} }

Notiek ielāde…
Atcelt
Saglabāt