typo here and there should be also statement what it return when not accepting connections and test it