Made listen testable, Implemented timeout of listen.