avoid crash when reading from connection times out
Differential Revision: https://phabricator.kde.org/D5681