Skip to content

Commit

Permalink
fix: Drop of very large files into Mattermost causes exception (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect authored Jan 9, 2025
1 parent 7b2804b commit b5360de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/channel/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,11 @@ class ZitiChannel {

// this._zitiContext.logger.debug(`send (no wait) -> ch[${this._id}] conn[${(options.conn ? options.conn.id : 'n/a')}] seq[${messageId}] contentType[${contentType}] bodyLen[${(body ? body.length : 'n/a')}] body[${(body ? body.toString() : 'n/a')}]`);
this._zitiContext.logger.debug(`ch.sendMessageNoWait() -> ch[${this._id}] conn[${(options.conn ? options.conn.id : 'n/a')}] socket[${options.conn ? options.conn.socket._id : 'n/a'}][${options.conn ? options.conn.socket.isNew : 'n/a'}] seq[${messageId}] contentType[${contentType}] byteLength[${(body ? body.byteLength : 'n/a')}]`);
this._zitiContext.logger.debug(`ch.sendMessageNoWait() -> body[${(body ? body.toString() : 'n/a')}]`);
try {
this._zitiContext.logger.debug(`ch.sendMessageNoWait() -> body[${(body ? body.toString() : 'n/a')}]`);
} catch (e) {
this._zitiContext.logger.debug(`ch.sendMessageNoWait() -> body.byteLength[${(body ? body.byteLength : 'n/a')}]`);
}

this._sendMarshaled(contentType, headers, body, options, messageId);
}
Expand Down

0 comments on commit b5360de

Please sign in to comment.