We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb84f2d commit 08ab05eCopy full SHA for 08ab05e
lib/wire/connection.js
@@ -233,9 +233,8 @@ class Connection {
233
// Send authData as length-prefixed buffer, not string
234
msg.addInt(authDataBuffer.length);
235
msg.addBuffer(authDataBuffer);
236
- // Add alignment padding
237
- var alen = (authDataBuffer.length + 3) & ~3;
238
- msg.addAlignment(alen - authDataBuffer.length);
+ // Add alignment padding - addAlignment calculates padding from data length
+ msg.addAlignment(authDataBuffer.length);
239
240
msg.addString(pluginName, Const.DEFAULT_ENCODING)
241
msg.addString(Const.AUTH_PLUGIN_LIST.join(','), Const.DEFAULT_ENCODING);
0 commit comments