Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
57d69fd1
Commit
57d69fd1
authored
Apr 16, 2018
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macos support on https client commit
parent
ead663ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
socket.cpp
src/brpc/socket.cpp
+6
-2
default_variables.cpp
src/bvar/default_variables.cpp
+5
-0
No files found.
src/brpc/socket.cpp
View file @
57d69fd1
...
...
@@ -1809,16 +1809,20 @@ int Socket::SSLHandshake(int fd, bool server_mode) {
switch
(
ssl_error
)
{
case
SSL_ERROR_WANT_READ
:
#if defined(OS_LINUX)
if
(
bthread_fd_wait
(
fd
()
,
EPOLLIN
)
!=
0
)
{
if
(
bthread_fd_wait
(
fd
,
EPOLLIN
)
!=
0
)
{
#elif defined(OS_MACOSX)
if
(
bthread_fd_wait
(
fd
()
,
EVFILT_READ
)
!=
0
)
{
if
(
bthread_fd_wait
(
fd
,
EVFILT_READ
)
!=
0
)
{
#endif
return
-
1
;
}
break
;
case
SSL_ERROR_WANT_WRITE
:
#if defined(OS_LINUX)
if
(
bthread_fd_wait
(
fd
,
EPOLLOUT
)
!=
0
)
{
#elif defined(OS_MACOSX)
if
(
bthread_fd_wait
(
fd
,
EVFILT_WRITE
)
!=
0
)
{
#endif
return
-
1
;
}
break
;
...
...
src/bvar/default_variables.cpp
View file @
57d69fd1
...
...
@@ -336,6 +336,9 @@ static int get_fd_count(int limit) {
for
(;
dr
.
Next
()
&&
count
<=
limit
+
3
;
++
count
)
{}
return
count
-
3
/* skipped ., .. and the fd in dr*/
;
#elif defined(OS_MACOSX)
// TODO(zhujiashun): following code will cause core dump with some
// probability under mac when program exits. Fix it.
/*
static pid_t pid = getpid();
std::ostringstream oss;
char cmdbuf[128];
...
...
@@ -354,6 +357,8 @@ static int get_fd_count(int limit) {
// skipped . and first column line
count = count - 2;
return std::min(count, limit);
*/
return
0
;
#else
return
0
;
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment