forked from cwtch.im/cwtch
Fixing potential timing conflict
This commit is contained in:
parent
96b6cf6bb8
commit
8b64ba19fd
|
@ -64,10 +64,9 @@ func (cpsc *CwtchPeerSendChannel) OpenOutbound(channel *channels.Channel) ([]byt
|
||||||
func (cpsc *CwtchPeerSendChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult) {
|
func (cpsc *CwtchPeerSendChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult) {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if crm.GetOpened() {
|
if crm.GetOpened() {
|
||||||
cpsc.channel.Pending = false
|
|
||||||
ce, _ := proto.GetExtension(crm, protocol.E_ServerNonce)
|
ce, _ := proto.GetExtension(crm, protocol.E_ServerNonce)
|
||||||
cpsc.challenge = ce.([]byte)[:]
|
cpsc.challenge = ce.([]byte)[:]
|
||||||
|
cpsc.channel.Pending = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue