cc1ac0
diff --git a/subversion/svnserve/serve.c b/subversion/svnserve/serve.c
cc1ac0
index 5192e7c..6159e22 100644
cc1ac0
--- a/subversion/svnserve/serve.c
cc1ac0
+++ b/subversion/svnserve/serve.c
cc1ac0
@@ -4101,7 +4101,7 @@ construct_server_baton(server_baton_t **baton,
cc1ac0
                        serve_params_t *params,
cc1ac0
                        apr_pool_t *scratch_pool)
cc1ac0
 {
cc1ac0
-  svn_error_t *err, *io_err;
cc1ac0
+  svn_error_t *err;
cc1ac0
   apr_uint64_t ver;
cc1ac0
   const char *client_url, *ra_client_string, *client_string;
cc1ac0
   svn_ra_svn__list_t *caplist;
cc1ac0
@@ -4239,11 +4239,12 @@ construct_server_baton(server_baton_t **baton,
cc1ac0
     }
cc1ac0
   if (err)
cc1ac0
     {
cc1ac0
-      log_error(err, b);
cc1ac0
-      io_err = svn_ra_svn__write_cmd_failure(conn, scratch_pool, err);
cc1ac0
-      svn_error_clear(err);
cc1ac0
-      SVN_ERR(io_err);
cc1ac0
-      return svn_ra_svn__flush(conn, scratch_pool);
cc1ac0
+      /* Report these errors to the client before closing the connection. */
cc1ac0
+      err = svn_error_compose_create(err,
cc1ac0
+              svn_ra_svn__write_cmd_failure(conn, scratch_pool, err));
cc1ac0
+      err = svn_error_compose_create(err,
cc1ac0
+              svn_ra_svn__flush(conn, scratch_pool));
cc1ac0
+      return err;
cc1ac0
     }
cc1ac0
 
cc1ac0
   SVN_ERR(svn_fs_get_uuid(b->repository->fs, &b->repository->uuid,