Moved field onAfterNextTrigger to be local variable of trigger of
connection.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>