diff --git a/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java b/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java
--- a/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java
+++ b/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java
@@ -148,9 +148,10 @@ private synchronized AsyncFile doWrite(Buffer buffer, long position, Handler<Asy
     Handler<AsyncResult<Void>> wrapped = ar -> {
       if (ar.succeeded()) {
         checkContext();
-        checkDrained();
         if (writesOutstanding == 0 && closedDeferred != null) {
           closedDeferred.run();
+        } else {
+          checkDrained();
         }
         if (handler != null) {
           handler.handle(ar);

diff --git a/src/test/java/io/vertx/test/core/FileSystemTest.java b/src/test/java/io/vertx/test/core/FileSystemTest.java
--- a/src/test/java/io/vertx/test/core/FileSystemTest.java
+++ b/src/test/java/io/vertx/test/core/FileSystemTest.java
@@ -54,6 +54,7 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import static io.vertx.test.core.TestUtils.*;
@@ -1547,6 +1548,24 @@ public void testAsyncFileCloseHandlerIsAsync() throws Exception {
     await();
   }
 
+  @Test
+  public void testDrainNotCalledAfterClose() throws Exception {
+    String fileName = "some-file.dat";
+    vertx.fileSystem().open(testDir + pathSep + fileName, new OpenOptions(), onSuccess(file -> {
+      Buffer buf = TestUtils.randomBuffer(1024 * 1024);
+      file.write(buf);
+      AtomicBoolean drainAfterClose = new AtomicBoolean();
+      file.drainHandler(v -> {
+        drainAfterClose.set(true);
+      });
+      file.close(ar -> {
+        assertFalse(drainAfterClose.get());
+        testComplete();
+      });
+    }));
+    await();
+  }
+
   private Handler<AsyncResult<Void>> createHandler(boolean shouldPass, Handler<Void> afterOK) {
     return ar -> {
       if (ar.failed()) {

AsyncFile drain handler should not be called after the file is closed

