refactoring timeout parameter for the frontend connections