File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.
33This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
44
55## Unreleased
6+ ### Changed
7+ - Improved logging of connection errors
8+
69### Fixed
710- Fixed bug causing empty times to be inserted into the DB even when the omitempty tag was set.
811
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ func (c *Cluster) connectNodes(hosts []Host) {
191191 for _ , host := range hosts {
192192 conn , err := NewConnection (host .String (), c .opts )
193193 if err != nil {
194+ log .Warnf ("Error creating connection %s" , err .Error ())
194195 continue
195196 }
196197 defer conn .Close ()
@@ -201,6 +202,7 @@ func (c *Cluster) connectNodes(hosts []Host) {
201202 c .opts ,
202203 ))
203204 if err != nil {
205+ log .Warnf ("Error fetching cluster status %s" , err )
204206 continue
205207 }
206208
Original file line number Diff line number Diff line change 55 "encoding/binary"
66 "fmt"
77 "io"
8+ "strings"
89
910 p "github.com/dancannon/gorethink/ql2"
1011)
@@ -60,6 +61,7 @@ func (c *Connection) readHandshakeSuccess() error {
6061 // convert to string and remove trailing NUL byte
6162 response := string (line [:len (line )- 1 ])
6263 if response != "SUCCESS" {
64+ response = strings .TrimSpace (response )
6365 // we failed authorization or something else terrible happened
6466 return RqlDriverError {fmt .Sprintf ("Server dropped connection with message: \" %s\" " , response )}
6567 }
You can’t perform that action at this time.
0 commit comments