Added timout duration to config and forced socket close on disconnect.