Skip to content

Commit

Permalink
Fix a bug, see commit detail
Browse files Browse the repository at this point in the history
  • Loading branch information
EddieIvan01 committed Mar 1, 2020
1 parent 37e934a commit d6cbaed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions netio/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ func NewTCPCtx(conn net.Conn, encrypted bool) (*TCPCtx, error) {
encrypted: encrypted,
}

encCipher, decCipher, err := crypto.NewCipherPair()
if err != nil {
return nil, err
}

if encrypted {
encCipher, decCipher, err := crypto.NewCipherPair()
if err != nil {
return nil, err
}

ctx.encCipher = encCipher
ctx.decCipher = decCipher
}
Expand Down

0 comments on commit d6cbaed

Please sign in to comment.