Skip to content

Commit

Permalink
[ FIX ] the way of creating response object to pass to callbacks as a…
Browse files Browse the repository at this point in the history
… payload
  • Loading branch information
saniyar-dev committed Feb 17, 2025
1 parent 7803716 commit 3cd52f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ func (c *Client) callEventListeners(t string, obj *sobek.Object) error {

// this function queueResponse for handling on the main event loop that the VU has
func (c *Client) queueResponse(resp *response.Response) {
rt := c.Vu.Runtime()
enqCallback := c.Vu.RegisterCallback()

go func() {
enqCallback(func() error {
return c.callEventListeners(RESPONSE, resp.Obj)
return c.callEventListeners(RESPONSE, rt.NewDynamicObject(resp))
})
}()
}
Expand Down

0 comments on commit 3cd52f0

Please sign in to comment.