Commit d8cccaa2 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Correctly report execution mode in Lua runtime after hooks.

parent 613efe9b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@ All notable changes to this project are documented below.
The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org).

## [Unreleased]
### Fixed
- Correctly report execution mode in Lua runtime after hooks.

## [2.2.1] - 2018-11-20
### Added
+1 −1
Original line number Diff line number Diff line
@@ -1252,7 +1252,7 @@ func (rp *RuntimeProviderLua) AfterReq(ctx context.Context, id string, logger *z
	}

	runtime.vm.SetContext(ctx)
	_, fnErr, _ := runtime.InvokeFunction(RuntimeExecutionModeBefore, lf, nil, userID, username, expiry, "", clientIP, clientPort, resMap, reqMap)
	_, fnErr, _ := runtime.InvokeFunction(RuntimeExecutionModeAfter, lf, nil, userID, username, expiry, "", clientIP, clientPort, resMap, reqMap)
	runtime.vm.SetContext(context.Background())
	rp.Put(runtime)