is that right? wouldn't @last_data_received be nil if you never receive any data? And is so, it might be more correct to reconnect...