@@ -154,7 +154,7 @@ def do_connect(host)
154154 supported_cql_versions . first :
155155 '3.1.0'
156156
157- startup_connection ( connection , cql_version , compression )
157+ startup_connection ( host , connection , cql_version , compression )
158158 end
159159 f . fallback do |error |
160160 case error
@@ -200,7 +200,7 @@ def do_connect(host)
200200 end
201201 end
202202
203- def startup_connection ( connection , cql_version , compression )
203+ def startup_connection ( host , connection , cql_version , compression )
204204 connection . send_request ( Protocol ::StartupRequest . new ( cql_version , compression ) ,
205205 @execution_options . timeout ) . flat_map do |r |
206206 case r
@@ -213,12 +213,9 @@ def startup_connection(connection, cql_version, compression)
213213 Ione ::Future . failed ( cannot_authenticate_error )
214214 end
215215 else
216- authenticator = @connection_options . create_authenticator (
217- r . authentication_class )
216+ authenticator = @connection_options . create_authenticator ( r . authentication_class , host )
218217 if authenticator
219- challenge_response_cycle ( connection ,
220- authenticator ,
221- authenticator . initial_response )
218+ challenge_response_cycle ( connection , authenticator , authenticator . initial_response )
222219 else
223220 Ione ::Future . failed ( cannot_authenticate_error )
224221 end
@@ -283,7 +280,7 @@ def challenge_response_cycle(connection, authenticator, token)
283280 case r
284281 when Protocol ::AuthChallengeResponse
285282 token = authenticator . challenge_response ( r . token )
286- challenge_response_cycle ( pending_connection , authenticator , token )
283+ challenge_response_cycle ( connection , authenticator , token )
287284 when Protocol ::AuthSuccessResponse
288285 begin
289286 authenticator . authentication_successful ( r . token )
0 commit comments