Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to retrieve user-name from frame returned by connection callback function #171

Open
psggit opened this issue Oct 23, 2020 · 0 comments

Comments

@psggit
Copy link

psggit commented Oct 23, 2020

**_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++))
}
})
**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant