Merge pull request #197 from fireice-uk/topic-uri-fix

Fix handling of stratum+tcp:// format
This commit is contained in:
psychocrypt
2017-07-09 19:04:43 +02:00
committed by GitHub
+3
View File
@@ -56,7 +56,10 @@ bool plain_socket::set_hostname(const char* sAddr)
sAddrMb[ln] = '\0';
if ((sTmp = strstr(sAddrMb, "//")) != nullptr)
{
sTmp += 2;
memmove(sAddrMb, sTmp, strlen(sTmp) + 1);
}
if ((sPort = strchr(sAddrMb, ':')) == nullptr)
return pCallback->set_socket_error("CONNECT error: Pool port number not specified, please use format <hostname>:<port>.");