I2PSAM: Don't connect socket in constructor.
This commit is contained in:
11
i2psam.cpp
11
i2psam.cpp
@ -65,10 +65,6 @@ Socket::Socket(const std::string& SAMHost, uint16_t SAMPort, const std::string&
|
||||
servAddr_.sin_family = AF_INET;
|
||||
servAddr_.sin_addr.s_addr = inet_addr(SAMHost.c_str());
|
||||
servAddr_.sin_port = htons(SAMPort);
|
||||
|
||||
init();
|
||||
if (isOk())
|
||||
handshake();
|
||||
}
|
||||
|
||||
Socket::Socket(const sockaddr_in& addr, const std::string &minVer, const std::string& maxVer)
|
||||
@ -107,6 +103,13 @@ Socket::~Socket()
|
||||
#endif
|
||||
}
|
||||
|
||||
void Socket::bootstrapI2P()
|
||||
{
|
||||
init();
|
||||
if (isOk())
|
||||
handshake();
|
||||
}
|
||||
|
||||
void Socket::init()
|
||||
{
|
||||
socket_ = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
Reference in New Issue
Block a user