Skip to content

Commit

Permalink
Merge branch 'master' of github.com:swoole/swoole-src
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Sep 7, 2021
2 parents d213f33 + 03e6f6d commit 0e42cbe
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PROJECT(libswoole)

ENABLE_LANGUAGE(ASM)
set(SWOOLE_VERSION 4.7.1)
set(SWOOLE_VERSION 4.7.2-dev)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g")
Expand Down
10 changes: 5 additions & 5 deletions include/swoole_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

#define SWOOLE_MAJOR_VERSION 4
#define SWOOLE_MINOR_VERSION 7
#define SWOOLE_RELEASE_VERSION 1
#define SWOOLE_EXTRA_VERSION ""
#define SWOOLE_VERSION "4.7.1"
#define SWOOLE_VERSION_ID 40701
#define SWOOLE_API_VERSION_ID 0x202108a
#define SWOOLE_RELEASE_VERSION 2
#define SWOOLE_EXTRA_VERSION "dev"
#define SWOOLE_VERSION "4.7.2-dev"
#define SWOOLE_VERSION_ID 40702
#define SWOOLE_API_VERSION_ID 0x202109a

#define SWOOLE_BUG_REPORT \
"A bug occurred in Swoole-v" SWOOLE_VERSION ", please report it.\n" \
Expand Down
9 changes: 7 additions & 2 deletions src/network/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,12 @@ static ssize_t Client_tcp_recv_no_buffer(Client *cli, char *data, size_t len, in
while (1) {
#ifdef HAVE_KQUEUE
int timeout_ms = (int) (cli->timeout * 1000);
if (cli->socket->wait_event(timeout_ms, SW_EVENT_READ) < 0) {
#ifdef SW_USE_OPENSSL
if (cli->socket->ssl) {
timeout_ms = 0;
}
#endif
if (timeout_ms > 0 && cli->socket->wait_event(timeout_ms, SW_EVENT_READ) < 0) {
return -1;
}
#endif
Expand All @@ -768,7 +773,7 @@ static ssize_t Client_tcp_recv_no_buffer(Client *cli, char *data, size_t len, in
}
}
#ifdef SW_USE_OPENSSL
if (errno == EAGAIN && cli->socket->ssl) {
if (cli->socket->catch_error(errno) == SW_WAIT && cli->socket->ssl) {
int timeout_ms = (int) (cli->timeout * 1000);
if (cli->socket->ssl_want_read && cli->socket->wait_event(timeout_ms, SW_EVENT_READ) == SW_OK) {
continue;
Expand Down
1 change: 1 addition & 0 deletions src/protocol/base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "swoole_string.h"
#include "swoole_socket.h"
#include "swoole_protocol.h"

namespace swoole {
/**
* return the package total length
Expand Down
2 changes: 1 addition & 1 deletion src/server/master.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void Server::call_command_callback(int64_t request_id, const std::string &result
auto iter = command_callbacks.find(request_id);
if (iter == command_callbacks.end()) {
swoole_error_log(
SW_LOG_ERROR, SW_ERROR_SERVER_INVALID_COMMAND, "Invalid command result[request_id=%lu]", request_id);
SW_LOG_ERROR, SW_ERROR_SERVER_INVALID_COMMAND, "Invalid command result[request_id=%ld]", request_id);
return;
}
iter->second(this, result);
Expand Down

0 comments on commit 0e42cbe

Please sign in to comment.