Compare commits

..

No commits in common. "488a3f4e54f9310431354ac64a7499ff0fc8045b" and "44d11f18d691acfadcaf03818d419dad2ebcdb3c" have entirely different histories.

2 changed files with 3 additions and 9 deletions

View File

@ -66,9 +66,9 @@ public class CrabServer implements Crab {
}
}
public synchronized void stop() {
isStopped = true;
public void stop() {
try {
isStopped = true;
if (socket != null) socket.close();
if (serverSocket != null) serverSocket.close();
} catch (IOException e) {

View File

@ -6,7 +6,7 @@ import java.sql.*;
import java.util.Date;
import java.util.Locale;
public class Database implements AutoCloseable {
public class Database {
private Connection connection;
private String logs = "";
@ -68,10 +68,4 @@ public class Database implements AutoCloseable {
else return logs.getBytes().length;
}
@Override
public void close() throws SQLException {
if (connection != null && !connection.isClosed()) {
connection.close();
}
}
}