Expose the underlying FCP connection.
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / highlevel / FcpClient.java
index 5bf4e1a..c159157 100644 (file)
@@ -234,6 +234,15 @@ public class FcpClient {
                return nodeHello;
        }
 
+       /**
+        * Returns the underlying FCP connection.
+        *
+        * @return The underlying FCP connection
+        */
+       public FcpConnection getConnection() {
+               return fcpConnection;
+       }
+
        //
        // ACTIONS
        //
@@ -270,8 +279,8 @@ public class FcpClient {
                        @Override
                        @SuppressWarnings("synthetic-access")
                        public void receivedNodeHello(FcpConnection fcpConnection, NodeHello nodeHello) {
-                               completionLatch.countDown();
                                FcpClient.this.nodeHello = nodeHello;
+                               completionLatch.countDown();
                        }
                }.execute();
        }