use timeout so that we do not wait indefinitely for the sms listener thread to exit