diff options
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/action_creators/websocket_actions.jsx | 18 | ||||
-rw-r--r-- | webapp/components/signup_team_complete/components/signup_team_complete.jsx | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/webapp/action_creators/websocket_actions.jsx b/webapp/action_creators/websocket_actions.jsx index 611d53bf7..009bb9e96 100644 --- a/webapp/action_creators/websocket_actions.jsx +++ b/webapp/action_creators/websocket_actions.jsx @@ -21,6 +21,7 @@ const WEBSOCKET_RETRY_TIME = 3000; var conn = null; var connectFailCount = 0; var pastFirstInit = false; +var manuallyClosed = false; export function initialize() { if (window.WebSocket && !conn) { @@ -35,6 +36,8 @@ export function initialize() { console.log('websocket connecting to ' + connUrl); //eslint-disable-line no-console } + manuallyClosed = false; + conn = new WebSocket(connUrl); conn.onopen = () => { @@ -69,12 +72,14 @@ export function initialize() { ErrorStore.setConnectionErrorCount(connectFailCount); ErrorStore.emitChange(); - setTimeout( - () => { - initialize(); - }, - WEBSOCKET_RETRY_TIME - ); + if (!manuallyClosed) { + setTimeout( + () => { + initialize(); + }, + WEBSOCKET_RETRY_TIME + ); + } }; conn.onerror = (evt) => { @@ -147,6 +152,7 @@ export function sendMessage(msg) { } export function close() { + manuallyClosed = true; if (conn && conn.readyState === WebSocket.OPEN) { conn.close(); } diff --git a/webapp/components/signup_team_complete/components/signup_team_complete.jsx b/webapp/components/signup_team_complete/components/signup_team_complete.jsx index 8b2096499..d21f4d7a9 100644 --- a/webapp/components/signup_team_complete/components/signup_team_complete.jsx +++ b/webapp/components/signup_team_complete/components/signup_team_complete.jsx @@ -55,7 +55,7 @@ export default class SignupTeamComplete extends React.Component { <div> <div className='signup-header'> <Link to='/'> - <span classNameName='fa fa-chevron-left'/> + <span className='fa fa-chevron-left'/> <FormattedMessage id='web.header.back'/> </Link> </div> |