File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
3434- Build with OpenSSL < 1.1.1 (#194 )
3535- Add ` ExecuteAsync ` and ` ExecuteTyped ` to common connector interface (#62 )
3636- Race conditions in methods of ` Future ` type (#195 )
37+ - Usage of nil pointer in Connection.peekFuture (#195 )
3738
3839## [ 1.6.0] - 2022-06-01
3940
Original file line number Diff line number Diff line change @@ -949,11 +949,12 @@ func (conn *Connection) peekFuture(reqid uint32) (fut *Future) {
949949 defer shard .rmut .Unlock ()
950950
951951 if conn .opts .Timeout > 0 {
952- fut = conn .getFutureImp (reqid , true )
953- pair := & shard .requests [pos ]
954- * pair .last = fut
955- pair .last = & fut .next
956- fut .timeout = time .Since (epoch ) + conn .opts .Timeout
952+ if fut = conn .getFutureImp (reqid , true ); fut != nil {
953+ pair := & shard .requests [pos ]
954+ * pair .last = fut
955+ pair .last = & fut .next
956+ fut .timeout = time .Since (epoch ) + conn .opts .Timeout
957+ }
957958 } else {
958959 fut = conn .getFutureImp (reqid , false )
959960 }
You can’t perform that action at this time.
0 commit comments