Connection timeout handling; fixes #30