use select not to hang on filtered ports