Skip to content

Commit

Permalink
Clarify ApplyPreset description
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Frolov authored and sergeyfrolov committed Jul 30, 2018
1 parent e7ad106 commit 4c28dcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions u_parrots.go
Expand Up @@ -209,8 +209,8 @@ func (uconn *UConn) applyPresetByID(id ClientHelloID) (err error) {
}

// ApplyPreset should only be used in conjunction with HelloCustom to apply custom specs.
// Separate ClientHelloSpec for each UConn is advised, to avoid state sharing.
// Also used internally.
// Fields of TLSExtensions that are slices/pointers are shared across different connections with
// same ClientHelloSpec. It is advised to use different specs and avoid any shared state.
func (uconn *UConn) ApplyPreset(p *ClientHelloSpec) error {
hello := uconn.HandshakeState.Hello
session := uconn.HandshakeState.Session
Expand Down

0 comments on commit 4c28dcf

Please sign in to comment.