File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ class Widget extends Component {
9090
9191 socket . on ( 'disconnect' , ( reason ) => {
9292 console . log ( reason ) ;
93- this . props . dispatch ( disconnectServer ( ) ) ;
93+ if ( reason !== 'io client disconnect' ) {
94+ this . props . dispatch ( disconnectServer ( ) ) ;
95+ }
9496 } ) ;
9597
9698 if ( this . props . embedded && this . props . initialized ) {
@@ -108,6 +110,11 @@ class Widget extends Component {
108110 }
109111 }
110112
113+ componentWillUnmount ( ) {
114+ const { socket } = this . props ;
115+ socket . close ( ) ;
116+ }
117+
111118 getSessionId ( ) {
112119 const { storage } = this . props ;
113120 // Get the local session, check if there is an existing session_id
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const ConnectedWidget = (props) => {
1515 sock ,
1616 storage ,
1717 props . docViewer ,
18- ) ;
18+ ) ;
1919 return ( < Provider store = { store } >
2020 < Widget
2121 socket = { sock }
You can’t perform that action at this time.
0 commit comments