take into account user options when using a router

Thanks for the timeout options. Unfortunately, it does not work when using a router. This small modification does the trick. Is it correct?

related to #372