forked from quic-go/quic-go
simplify the CryptoSetup.SetDiversificationNonce interface
Pass the diversification nonce via a channel instead of setting it directly. That way there is no need to protect the diversificationNonce member by a mutex. Also prevents a possible deadlock that occurred when SetDiversificationNonce was called before maybeUpgradeCrypto returned.
This commit is contained in:
@@ -435,7 +435,7 @@ func (h *cryptoSetupServer) DiversificationNonce() []byte {
|
||||
return h.diversificationNonce
|
||||
}
|
||||
|
||||
func (h *cryptoSetupServer) SetDiversificationNonce(data []byte) error {
|
||||
func (h *cryptoSetupServer) SetDiversificationNonce(data []byte) {
|
||||
panic("not needed for cryptoSetupServer")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user