Another advantage to an inline function declaration here is that you won't need to pass references to `connectionID` and `res`, since both will be available via closure context.