I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 165b2cf2 authored by giv's avatar giv
Browse files

fix hang at I2P error

parent 7dc12aed
No related branches found
No related tags found
No related merge requests found
......@@ -310,6 +310,7 @@ RequestResult<std::auto_ptr<Socket> > StreamSession::accept(bool silent)
case Message::EMPTY_ANSWER:
case Message::CLOSED_SOCKET:
case Message::INVALID_ID:
case Message::I2P_ERROR:
fallSick();
break;
default:
......@@ -331,6 +332,7 @@ RequestResult<std::auto_ptr<Socket> > StreamSession::connect(const std::string&
case Message::EMPTY_ANSWER:
case Message::CLOSED_SOCKET:
case Message::INVALID_ID:
case Message::I2P_ERROR:
fallSick();
break;
default:
......@@ -354,6 +356,7 @@ RequestResult<void> StreamSession::forward(const std::string& host, uint16_t por
case Message::EMPTY_ANSWER:
case Message::CLOSED_SOCKET:
case Message::INVALID_ID:
case Message::I2P_ERROR:
fallSick();
break;
default:
......
......@@ -22,6 +22,7 @@
#include <arpa/inet.h> // for ntohs and htons
#endif
// TODO: check a possible bug about cast -1 to SOCKET
#define SAM_INVALID_SOCKET (-1)
#define SAM_SOCKET_ERROR (-1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment