Catch socket error when server is down / not responding

When the NN is not responding, it throws error(113, 'No route to host'). We
should capture that and switch to next available NN.