diff --git a/.github/workflows/ci.macos.arm.yml b/.github/workflows/ci.macos.arm.yml index aa9e6d36..590f7f5d 100644 --- a/.github/workflows/ci.macos.arm.yml +++ b/.github/workflows/ci.macos.arm.yml @@ -27,6 +27,10 @@ jobs: - name: Build run: | cmake -B ${{github.workspace}}/build \ +<<<<<<< HEAD +======= + -D PHOTON_CXX_STANDARD=17 \ +>>>>>>> 262c468 (Pick mac ci from 0.8 back to 0.7 so it able to compile unittests) -D PHOTON_ENABLE_ECOSYSTEM=ON \ -D PHOTON_BUILD_TESTING=ON \ -D CMAKE_BUILD_TYPE=MinSizeRel \ @@ -37,4 +41,4 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build - run: ctest -E test-lockfree --timeout 3600 -V + run: ctest -E test-lockfree --timeout 3600 -V \ No newline at end of file diff --git a/.github/workflows/ci.macos.x86.yml b/.github/workflows/ci.macos.x86.yml new file mode 100644 index 00000000..d4469173 --- /dev/null +++ b/.github/workflows/ci.macos.x86.yml @@ -0,0 +1,41 @@ +name: macOS x86_64 + +on: + push: + branches: [ "main", "release/*" ] + pull_request: + branches: [ "main", "release/*" ] + +jobs: + macOS13-x86: + runs-on: macos-13 + + steps: + - uses: szenius/set-timezone@v2.0 + with: + timezoneLinux: "Asia/Shanghai" + timezoneMacos: "Asia/Shanghai" + timezoneWindows: "China Standard Time" + + - uses: actions/checkout@v4 + + - name: Install Dependencies + shell: bash + run: | + brew install openssl gflags googletest gsasl nasm + + - name: Build + run: | + cmake -B ${{github.workspace}}/build \ + -D PHOTON_CXX_STANDARD=17 \ + -D PHOTON_ENABLE_ECOSYSTEM=ON \ + -D PHOTON_BUILD_TESTING=ON \ + -D CMAKE_BUILD_TYPE=MinSizeRel \ + -D PHOTON_ENABLE_SASL=ON \ + -D PHOTON_ENABLE_LIBCURL=ON \ + -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 + cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) + + - name: Test + working-directory: ${{github.workspace}}/build + run: ctest -E test-lockfree --timeout 3600 -V \ No newline at end of file diff --git a/net/http/client.cpp b/net/http/client.cpp index 9dd48cc1..6336d222 100644 --- a/net/http/client.cpp +++ b/net/http/client.cpp @@ -263,6 +263,7 @@ class ClientImpl : public Client { resp.reset((char *)buf, kMinimalHeadersSize, true, sock.release(), true, req.verb()); } if (op->resp.receive_header(tmo.timeout()) != 0) { + sock->close(); req.reset_status(); LOG_ERROR_RETURN(0, ROUNDTRIP_NEED_RETRY, "read response header failed"); }