Skip to content

Commit

Permalink
Reconnect when call Meteor.logout
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo mathieu committed Mar 23, 2016
1 parent f388560 commit bbd158f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# react-native-meteor

Meteor-like methods for React Native. **Currently in v1.0.0-beta18** ! For old docs, see [v0.6.2 documentation](https://github.com/inProgress-team/react-native-meteor/tree/0.6.2) (classic ddp interface).
Meteor-like methods for React Native. **Currently in v1.0.0-beta19** ! For old docs, see [v0.6.2 documentation](https://github.com/inProgress-team/react-native-meteor/tree/0.6.2) (classic ddp interface).

## What is it for ?

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-meteor",
"version": "1.0.0-beta18",
"version": "1.0.0-beta19",
"description": "DDP React-native Client",
"main": "src/Meteor.js",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/Meteor.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ module.exports = {

},
connect(endpoint, options) {
if(!endpoint) endpoint = Data._endpoint;
if(!options) options = Data._options;

Data._endpoint = endpoint;
Data._options = options;

Expand Down
3 changes: 3 additions & 0 deletions src/user/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ module.exports = {
AsyncStorage.removeItem(TOKEN_KEY);
this._tokenIdSaved = null;
this._userIdSaved = null;

this.connect();

typeof callback == 'function' && callback(err);
});
},
Expand Down

0 comments on commit bbd158f

Please sign in to comment.