On html5,  we dealt as the same as this,   the http status is show there: http://httpstatus.es/
when stauts is 599, the network is connected timeout. may be should change some return value on httpclient to return timeout status,  because current only return -1 when timeout.