react-stomp
react-stomp copied to clipboard
Not able to retrieve user-name from frame returned by connection callback function
**_Expected Change:
this.client.connect(this.props.headers, (frame) => { console.log("frame", frame) this.setState({ connected: true }) this.props.topics.forEach((topic) => { this._subscribe(topic) }) this.props.onConnect(frame) }, (error) => { if (error) { if (Object.keys(this.props).includes('onConnectFailure')) { this.props.onConnectFailure(error) } else { this._log(error.stack) } } if (this.state.connected) { this._cleanUp() // onDisconnect should be called only once per connect this.props.onDisconnect() } if (this.props.autoReconnect && !this.state.explicitDisconnect) { this._timeoutId = setTimeout(this.connect, this.props.getRetryInterval(this.retryCount++)) } })**