Skip to content

Commit

Permalink
fix(ble): fix yamux protocol error, do not connect when need to accep…
Browse files Browse the repository at this point in the history
…t incoming

Signed-off-by: Sacha Froment <sfroment42@gmail.com>
  • Loading branch information
sfroment committed Oct 29, 2018
1 parent 56cb86b commit 44164ca
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/network/ble/transport.go
Expand Up @@ -103,16 +103,15 @@ func (t *Transport) ListenNewPeer() {
if lVal < rVal {
t.MySelf.Connect(context.Background(), *pi)
} else {
val, err := pi.Addrs[0].ValueForProtocol(PBle)
bleUUID, err := pi.Addrs[0].ValueForProtocol(PBle)
if err != nil {
panic(err)
}
val2, err := t.lAddr.ValueForProtocol(PBle)
lBleUUID, err := t.lAddr.ValueForProtocol(PBle)
if err != nil {
panic(err)
}
RealAcceptSender(val2, val, peerID)
t.MySelf.Connect(context.Background(), *pi)
RealAcceptSender(lBleUUID, bleUUID, peerID)
}
}
}
Expand Down

0 comments on commit 44164ca

Please sign in to comment.