Adding optional connection object parameter to emitReturnAck and emitReturnError events.