Fix router and host to communicate with each other in thread