Skip to content

Commit

Permalink
simplify a line
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Sep 18, 2016
1 parent e53ecdc commit 1fb16b3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sess.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,8 @@ func DialWithOptions(raddr string, block BlockCrypt, dataShards, parityShards in
return nil, errors.Wrap(err, "net.DialUDP")
}

buf := make([]byte, 4)
io.ReadFull(rand.Reader, buf)
convid := binary.LittleEndian.Uint32(buf)
var convid uint32
binary.Read(rand.Reader, binary.LittleEndian, &convid)
for k := range opts {
switch opt := opts[k].(type) {
case OptionWithConvId:
Expand Down

0 comments on commit 1fb16b3

Please sign in to comment.