Skip to content

Commit 8047c8f

Browse files
authored
Merge pull request #237 from Stiffstream/0.7-dev-mac-issue-test
Fix sendfile operation on macos
2 parents 35c0f46 + bd2f562 commit 8047c8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dev/restinio/impl/connection.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,9 +1325,9 @@ class connection_t final
13251325
// the lambda because lambda object itself will be
13261326
// destroyed.
13271327
auto op_ctx_reseter = restinio::utils::at_scope_exit(
1328-
[&op_ctx] {
1328+
[op_ctx_copy = op_ctx] () mutable {
13291329
// Reset sendfile operation context.
1330-
RESTINIO_ENSURE_NOEXCEPT_CALL( op_ctx.reset() );
1330+
RESTINIO_ENSURE_NOEXCEPT_CALL( op_ctx_copy.reset() );
13311331
} );
13321332

13331333
if( !ec )

0 commit comments

Comments
 (0)