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

Log when missing transport on ClientSession.prototype.send #217

Merged
merged 1 commit into from
Feb 8, 2016

Conversation

junosuarez
Copy link
Contributor

Some ClientSessions appear not to have an underlying transport.send. This
adds some logging to troubleshoot further.

References

Required

  • 👍 from @zendesk/radar

Risks

  • Medium, some messages will not be sent (note that this is currently happening and crashing the process with an uncaught exception)

@kazraza
Copy link

kazraza commented Feb 8, 2016

👍

junosuarez added a commit that referenced this pull request Feb 8, 2016
Log when missing transport on ClientSession.prototype.send
@junosuarez junosuarez merged commit 6b0d865 into master Feb 8, 2016
@@ -61,7 +61,11 @@ ClientSession.prototype._cleanup = function () {
ClientSession.prototype.send = function (message) {
var data = JSON.stringify(message)
log.info('#socket.message.outgoing', this.id, data)
this.transport.send(data)
if (!this.transport || !this.transport.send) {
log.warn('Missing transport, skipping message send', this.id, this.accountName, this.name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird.

@junosuarez
Copy link
Contributor Author

Published as [email protected]

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

Successfully merging this pull request may close these issues.

3 participants