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