Преглед на файлове

Merge pull request #325 from obeattie/session-consistency

Default a Session's consistency to that of its ClusterConfig
Ben Hood преди 10 години
родител
ревизия
62c3ce3be5
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      session.go

+ 1 - 1
session.go

@@ -40,7 +40,7 @@ type Session struct {
 
 // NewSession wraps an existing Node.
 func NewSession(p ConnectionPool, c ClusterConfig) *Session {
-	return &Session{Pool: p, cons: Quorum, prefetch: 0.25, cfg: c}
+	return &Session{Pool: p, cons: c.Consistency, prefetch: 0.25, cfg: c}
 }
 
 // SetConsistency sets the default consistency level for this session. This