Fix io write stop
Refactor timeout / connection settings.