diff options
Diffstat (limited to 'google_apis/gcm/engine/fake_connection_handler.cc')
-rw-r--r-- | google_apis/gcm/engine/fake_connection_handler.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/google_apis/gcm/engine/fake_connection_handler.cc b/google_apis/gcm/engine/fake_connection_handler.cc index dbffbce..243c280 100644 --- a/google_apis/gcm/engine/fake_connection_handler.cc +++ b/google_apis/gcm/engine/fake_connection_handler.cc @@ -32,7 +32,8 @@ FakeConnectionHandler::FakeConnectionHandler( write_callback_(write_callback), fail_login_(false), fail_send_(false), - initialized_(false) { + initialized_(false), + had_error_(false) { } FakeConnectionHandler::~FakeConnectionHandler() { @@ -51,10 +52,11 @@ void FakeConnectionHandler::Init(const mcs_proto::LoginRequest& login_request, void FakeConnectionHandler::Reset() { initialized_ = false; + had_error_ = false; } bool FakeConnectionHandler::CanSendMessage() const { - return initialized_; + return initialized_ && !had_error_; } void FakeConnectionHandler::SendMessage( |