Improve connection timeout handling

+ Sample chat client