potential fix for #185

add a timeout to message receive state, so we don't wait forever for messages.