Expose whether an FCP connection is closed
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Wed, 25 Nov 2015 06:46:25 +0000 (07:46 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Wed, 25 Nov 2015 06:46:25 +0000 (07:46 +0100)
src/main/java/net/pterodactylus/fcp/FcpConnection.java

index b191ad1..0eda39d 100644 (file)
@@ -156,6 +156,10 @@ public class FcpConnection implements Closeable {
                fcpListenerManager.removeListener(fcpListener);
        }
 
+       public synchronized boolean isClosed() {
+               return connectionHandler != null;
+       }
+
        //
        // ACTIONS
        //