File tree 2 files changed +7
-5
lines changed
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.
34
34
- Build with OpenSSL < 1.1.1 (#194 )
35
35
- Add ` ExecuteAsync ` and ` ExecuteTyped ` to common connector interface (#62 )
36
36
- Race conditions in methods of ` Future ` type (#195 )
37
+ - Usage of nil pointer in Connection.peekFuture (#195 )
37
38
38
39
## [ 1.6.0] - 2022-06-01
39
40
Original file line number Diff line number Diff line change @@ -949,11 +949,12 @@ func (conn *Connection) peekFuture(reqid uint32) (fut *Future) {
949
949
defer shard .rmut .Unlock ()
950
950
951
951
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
+ }
957
958
} else {
958
959
fut = conn .getFutureImp (reqid , false )
959
960
}
You can’t perform that action at this time.
0 commit comments