nginx-0.0.1-2003-10-12-20:49:16 import
diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c
index 5db4080..f7751a7 100644
--- a/src/os/unix/ngx_freebsd_sendfile_chain.c
+++ b/src/os/unix/ngx_freebsd_sendfile_chain.c
@@ -34,6 +34,10 @@
     ngx_hunk_t      *file;
     ngx_chain_t     *ce, *tail;
 
+    if (!c->write->ready) {
+        return in;
+    }
+
     do {
         ce = in;
         file = NULL;