Right now, the timeout passed to greet is disregarded. It should instead be passed to the ehlo and helo methods.
One downside of this specific implementation is that in the worst case, a call to greet will take 2*timeout if both methods time out. Instead, something with setInterval could be implemented, but I'm not sure whether some cleanup might be required in that case.
Right now, the timeout passed to
greet
is disregarded. It should instead be passed to theehlo
andhelo
methods.One downside of this specific implementation is that in the worst case, a call to
greet
will take 2*timeout
if both methods time out. Instead, something withsetInterval
could be implemented, but I'm not sure whether some cleanup might be required in that case.