Skip to content

Commit

Permalink
fix(network): fix driver that can't close
Browse files Browse the repository at this point in the history
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
  • Loading branch information
sfroment committed Feb 1, 2019
1 parent f01552c commit 2aa6225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/react-native/common/components/Library/Header.js
Expand Up @@ -180,7 +180,7 @@ class StateBadge extends PureComponent {
const count = peers.reduce((acc, cur) => cur.connection === 1 ? acc + 1 : acc, 0)

return (
<Flex.Cols size={1} style={{ display: 'flex', justifyContent: 'space-between' }} >
<Flex.Cols size={1} style={{ top: 0, right: 40 }} >
<View style={{ marginRight: 2 }} >
<Text icon='berty-berty_picto' size={5} padding={5} rounded small background={bgBertyColor} color={bertyColor}>{bertyText.toLocaleUpperCase()}</Text>
</View>
Expand Down Expand Up @@ -278,7 +278,7 @@ export default class Header extends PureComponent {
>
{title}
</Text>
<View>
<View style={[ !searchBar ? paddingBottom : {} ]} >
<RelayContext.Consumer>
{context => <StateBadge context={context} />}
</RelayContext.Consumer>
Expand Down
2 changes: 1 addition & 1 deletion core/network/p2p/driver.go
Expand Up @@ -113,10 +113,10 @@ func newDriver(ctx context.Context, cfg driverConfig) (*Driver, error) {
host: host,
rootContext: ctx,
providers: provider.NewManager(),
shutdown: make(chan struct{}, 1),
}

if cfg.relayWatcher {
driver.shutdown = make(chan struct{}, 1)
WatchRelayDisconnection(cfg.connManager.relayMap, host, driver.shutdown)
}

Expand Down

0 comments on commit 2aa6225

Please sign in to comment.