Catching "socket hang up" error in request module

I'm using the request module to send requests (GET & POST) to a 3rd-party API.

I'm using the timeout option to limit the waiting time for the response (can't wait too long for it).

The problem is that sometimes the following exception is thrown:

Error: socket hang up at createHangUpError (http.js:1476:15) at Socket.socketCloseListener (http.js:1526:23) at Socket.emit (events.js:117:20) at TCP.close (net.js:465:12)

I'm guessing that's because requests are aborted (due to timeout) but the socket is still open and hangs up after 2 minutes.

The question is - what can I do to close the socket when a request is aborted or how to catch this exception and handle it gracefully.

Here is the relevant code I use:

var request = require('request'),
    requestOptions = {
        url: 'http://example.com/api',
        timeout: 1000
    };

request(requestOptions, function onResponse(error, response, body) {
    if (error) {
        //Trying to close the socket (to prevent socket hang up errors)
        //**Doesn't help**
        this.req.socket.destroy();
        this.req.destroy();
        return;
    }

    //Handle the response
});