| 745 | } |
| 746 | |
| 747 | void AsyncHttpClient::onError(int8_t error) |
| 748 | { |
| 749 | const char* errorDescription = errorToStr(error); |
| 750 | |
| 751 | if (nullptr != errorDescription) |
| 752 | { |
| 753 | LOG_WARNING("Error occurred: %d - %s", error, errorDescription); |
| 754 | } |
| 755 | else |
| 756 | { |
| 757 | const int8_t HOST_IS_UNREACHABLE = 113; /* https://github.com/yubox-node-org/AsyncTCPSock/issues/13 */ |
| 758 | |
| 759 | LOG_WARNING("Error occurred: %d", error); |
| 760 | |
| 761 | if (HOST_IS_UNREACHABLE == error) |
| 762 | { |
| 763 | LOG_WARNING("Host is unreachable."); |
| 764 | } |
| 765 | } |
| 766 | |
| 767 | m_isError = true; |
| 768 | notifyError(); |
| 769 | disconnect(); |
| 770 | } |
| 771 | |
| 772 | void AsyncHttpClient::onData(const uint8_t* data, size_t len) |
| 773 | { |
no outgoing calls
no test coverage detected