askmike / bitstamp

Bitstamp REST API wrapper
81 stars 54 forks source link

Socket Hangup Error while long term running #16

Closed shijianqi closed 9 years ago

shijianqi commented 10 years ago

Please change:

'Content-Length': data.length -> Buffer.byteLength(post_data),

askmike commented 10 years ago

What change do you mean exactly?

The current code sends the post data as a string, and the length is send over via the Content-Length header.

It could be the case that Bitstamp failed to respond within 5 seconds which causes a timeout.