Fix main() to accept the reactor as its first parameter.