Skip to content

Commit

Permalink
further work to make project websocket less likely to DDOS our proxy …
Browse files Browse the repository at this point in the history
…server
  • Loading branch information
williamstein committed Feb 25, 2019
1 parent 76eb372 commit b7e0208
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/smc-util/smc-version.js
@@ -1,2 +1,2 @@
/* autogenerated by the update_version script */
exports.version=1551080008;
exports.version=1551080928;
12 changes: 6 additions & 6 deletions src/smc-webapp/project/websocket/connect.ts
Expand Up @@ -115,9 +115,9 @@ async function connection_to_project0(project_id: string): Promise<any> {
}
},
start_delay: 1000,
max_delay: 15000, // do not make too aggressive or it DDOS proxy server
max_delay: 15000, // do not make too aggressive or it DDOS proxy server
factor: 1.3,
desc : 'connecting to project'
desc: "connecting to project"
//log: (...x) => {
// console.log("retry primus:", ...x);
//}
Expand All @@ -127,10 +127,10 @@ async function connection_to_project0(project_id: string): Promise<any> {
// However, we don't want to overwrite the usual global window.Primus.
const conn = (connections[project_id] = Primus.connect({
reconnect: {
max: 5000,
min: 1000,
factor: 1.3,
retries: 1000
max: 30000, // do not make too aggressive or it DDOS proxy server
min: 3000,
factor: 1.5,
retries: Infinity
}
}));
conn.api = new API(conn);
Expand Down

0 comments on commit b7e0208

Please sign in to comment.