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