Skip to content

Commit e3e27db

Browse files
authored
Merge pull request #103 from kiwicom/ms/scylla-dialer-cleanup
Remove scyllaConnPicker.dialer
2 parents e5a83d2 + 3bacbcf commit e3e27db

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

scylla.go

-17
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ type scyllaConnPicker struct {
217217
nrShards int
218218
msbIgnore uint64
219219
pos uint64
220-
dialer Dialer
221220
lastAttemptedShard int
222221
shardAwarePortDisabled bool
223222

@@ -254,29 +253,13 @@ func newScyllaConnPicker(conn *Conn) *scyllaConnPicker {
254253
shardAwareAddress: shardAwareAddress,
255254
nrShards: conn.scyllaSupported.nrShards,
256255
msbIgnore: conn.scyllaSupported.msbIgnore,
257-
dialer: makeDialerForScyllaConnPicker(conn),
258256
lastAttemptedShard: 0,
259257
shardAwarePortDisabled: conn.session.cfg.DisableShardAwarePort,
260258

261259
disableShardAwarePortUntil: new(atomic.Value),
262260
}
263261
}
264262

265-
func makeDialerForScyllaConnPicker(conn *Conn) Dialer {
266-
cfg := conn.session.connCfg
267-
dialer := cfg.Dialer
268-
if dialer == nil {
269-
d := &ScyllaShardAwareDialer{}
270-
d.Timeout = cfg.ConnectTimeout
271-
if cfg.Keepalive > 0 {
272-
d.KeepAlive = cfg.Keepalive
273-
}
274-
dialer = d
275-
}
276-
277-
return dialer
278-
}
279-
280263
func (p *scyllaConnPicker) Pick(t token) *Conn {
281264
if len(p.conns) == 0 {
282265
return nil

0 commit comments

Comments
 (0)