easternbloc / node-stomp-client

A STOMP client for Node.js
Other
93 stars 47 forks source link

Support for nack on Stomp 1.1 needs a change #80

Closed Jairo0410 closed 4 years ago

Jairo0410 commented 4 years ago

When I use the nack method, I keep getting the following error:

NACK received but connection is in v1.0 mode.

There's not too much information about that specific issue on Google, but I could solve it by editing the file lib/client.js to include a accept-version header when using the CONNECT command. So the headers on the file remain like this:

var headers = { 'login': self.user, 'passcode': self.pass, 'accept-version' : this.version };