mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-11 08:55:23 +03:00
Merge pull request #2687 from urbit/la-resub-on-err
chat-js: resubscribe on error, not just on quit
This commit is contained in:
commit
5fe16a7f47
@ -21,7 +21,10 @@ export class Subscription {
|
||||
subscribe(path, app) {
|
||||
api.bind(path, 'PUT', api.authTokens.ship, app,
|
||||
this.handleEvent.bind(this),
|
||||
this.handleError.bind(this),
|
||||
(err) => {
|
||||
console.log(err);
|
||||
this.subscribe(path, app);
|
||||
},
|
||||
() => {
|
||||
this.subscribe(path, app);
|
||||
});
|
||||
@ -48,10 +51,6 @@ export class Subscription {
|
||||
store.handleEvent(diff);
|
||||
}
|
||||
|
||||
handleError(err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
fetchMessages(start, end, path) {
|
||||
console.log(start, end, path);
|
||||
fetch(`/~chat/paginate/${start}/${end}${path}`)
|
||||
|
Loading…
Reference in New Issue
Block a user