File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -456,7 +456,13 @@ namespace Aws
456
456
}
457
457
458
458
void SetAction (ConnectionCallbackActionType action) { m_action = action; }
459
- void SetError (RpcError error) { m_error = error; }
459
+ void SetError (RpcError error)
460
+ {
461
+ if (m_error.baseStatus == EVENT_STREAM_RPC_SUCCESS)
462
+ {
463
+ m_error = error;
464
+ }
465
+ }
460
466
461
467
std::future<RpcError> GetConnectPromiseFuture () { return m_connectPromise.get_future (); }
462
468
@@ -873,6 +879,9 @@ namespace Aws
873
879
{
874
880
std::lock_guard<std::mutex> lock (impl->m_sharedStateLock );
875
881
AWS_FATAL_ASSERT (impl->m_sharedState .m_currentState == ClientState::PendingConnect);
882
+
883
+ // the channel owns the initial ref; we have to take our own
884
+ aws_event_stream_rpc_client_connection_acquire (connection);
876
885
impl->m_sharedState .m_underlyingConnection = connection;
877
886
if (impl->m_sharedState .m_desiredState != ClientState::Connected)
878
887
{
You can’t perform that action at this time.
0 commit comments