Browse Source

Merge pull request #3 from hardlifeofapo/master

Calculating message length based on bytes
master
Brett Langdon 12 years ago
parent
commit
5126032d89
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      lib/kestrelClient.js
  2. +2
    -1
      package.json

+ 1
- 1
lib/kestrelClient.js View File

@ -195,7 +195,7 @@ kestrel.prototype.set = function( queue, value, lifetime ){
}
var command = "SET " + queue + " 0 " + lifetime + " ";
command += value.length + "\r\n" + value + "\r\n";
command += Buffer.byteLength(value, 'utf8') + "\r\n" + value + "\r\n";
var connection = this._getConnection();
if( connection != null ){


+ 2
- 1
package.json View File

@ -6,7 +6,8 @@
, "keywords": ["kestrel", "client", "messaging", "queue"]
, "author": "brett_langdon <brett@blangdon.com> (http://brett.is)"
, "contributors": [
{ "name": "brett_langdon", "email": "brett@blangdon.com" }
{ "name": "brett_langdon", "email": "brett@blangdon.com" },
{ "name": "pablo_casado", "email": "p.casado.arias@gmail.com" }
]
, "repository":{
"type": "git"


Loading…
Cancel
Save