turn off extra workflows to minimize spam
This commit is contained in:
parent
13bdfef52a
commit
353046b9d5
2
.github/workflows/appimage.yml
vendored
2
.github/workflows/appimage.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ "main", "release-**"]
|
branches: [ "main", "release-**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-appimage:
|
build-appimage:
|
||||||
|
|||||||
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ "main", "release-**"]
|
branches: [ "main", "release-**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-dmg:
|
build-dmg:
|
||||||
|
|||||||
@ -191,15 +191,15 @@ public:
|
|||||||
static inline int closesocket(int descriptor) noexcept {
|
static inline int closesocket(int descriptor) noexcept {
|
||||||
return close(descriptor);
|
return close(descriptor);
|
||||||
}
|
}
|
||||||
static inline void handle_socket_error(const std::string& message) {
|
static inline std::runtime_error handle_socket_error(const std::string& message) {
|
||||||
int err = errno;
|
int err = errno;
|
||||||
throw std::runtime_error(
|
return std::runtime_error(
|
||||||
message+" [errno=" + std::to_string(err) +
|
message+" [errno=" + std::to_string(err) + "]: " +
|
||||||
"]: " + std::string(strerror(err))
|
std::string(strerror(err))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void handle_socket_error(const std::string& message) {
|
static inline std::runtime_error handle_socket_error(const std::string& message) {
|
||||||
wchar_t* s = nullptr;
|
wchar_t* s = nullptr;
|
||||||
FormatMessageW(
|
FormatMessageW(
|
||||||
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
|
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
|
||||||
@ -214,7 +214,7 @@ static inline void handle_socket_error(const std::string& message) {
|
|||||||
assert(s != nullptr);
|
assert(s != nullptr);
|
||||||
std::string errorString = util::wstr2str_utf8(std::wstring(s));
|
std::string errorString = util::wstr2str_utf8(std::wstring(s));
|
||||||
LocalFree(s);
|
LocalFree(s);
|
||||||
throw std::runtime_error(message+"; "+errorString);
|
return std::runtime_error(message+"; "+errorString);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -356,9 +356,10 @@ public:
|
|||||||
|
|
||||||
int res = connectsocket(descriptor, addrinfo->ai_addr, addrinfo->ai_addrlen);
|
int res = connectsocket(descriptor, addrinfo->ai_addr, addrinfo->ai_addrlen);
|
||||||
if (res == -1) {
|
if (res == -1) {
|
||||||
|
auto error = handle_socket_error("Connect failed");
|
||||||
closesocket(descriptor);
|
closesocket(descriptor);
|
||||||
freeaddrinfo(addrinfo);
|
freeaddrinfo(addrinfo);
|
||||||
handle_socket_error("Connect failed");
|
throw error;
|
||||||
}
|
}
|
||||||
logger.info() << "connected to " << address << " ["
|
logger.info() << "connected to " << address << " ["
|
||||||
<< to_string(addrinfo) << ":" << port << "]";
|
<< to_string(addrinfo) << ":" << port << "]";
|
||||||
|
|||||||
@ -19,8 +19,8 @@ TEST(curltest, curltest) {
|
|||||||
}, [](auto){}
|
}, [](auto){}
|
||||||
);
|
);
|
||||||
if (true) {
|
if (true) {
|
||||||
auto socket = network->getConnection(network->connect("localhost", 8000));
|
auto socket = network->getConnection(network->connect("google.com", 80));
|
||||||
const char* string = "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n";
|
const char* string = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n";
|
||||||
socket->send(string, strlen(string));
|
socket->send(string, strlen(string));
|
||||||
char data[1024];
|
char data[1024];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user