Permalink
Browse files

fix generic_nack

  • Loading branch information...
1 parent 152303d commit b1e76c8d9b578ffa2e8bdfe8c0c24728f99ed6b0 @bjyoungblood bjyoungblood committed Jan 5, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −2 lib/data-handler.js
  2. +3 −1 lib/server-connection.js
View
@@ -37,8 +37,7 @@ exports.fromBuffer = function(pduBuffer, splitBuffer) {
}
// we should not receive a PDU that is less than 16 bytes. if we do, there's
- // something wrong, and we should probably emit an error from here instead
- // of returning false (TODO)
+ // something wrong
if (pduBuffer.length < 16) {
throw "not enough data";
}
View
@@ -163,12 +163,14 @@ var serverConnection = function(socket, server, closeConnectionServerCallback, c
self.generic_nack = function() {
var pdu = {
command: "generic_nack",
- command_id: "ESME_RINVCMDLEN",
+ command_status: "ESME_RINVCMDLEN",
sequence_number: 0,
fields: {}
};
self.sendPdu(pdu);
+ self.unbind();
+ self.socket.end();
};
self.deliverMessage = function(params, optional) {

0 comments on commit b1e76c8

Please sign in to comment.