Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cppdap
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
cppdap
Commits
ad9b4588
Commit
ad9b4588
authored
May 26, 2020
by
Ben Clayton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `dap::Socket::read()` when `recv()` errors
Identified by @kuafuwang. Fixes #29
parent
9e313445
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
socket.cpp
src/socket.cpp
+3
-1
No files found.
src/socket.cpp
View file @
ad9b4588
...
@@ -158,7 +158,9 @@ class dap::Socket::Shared : public dap::ReaderWriter {
...
@@ -158,7 +158,9 @@ class dap::Socket::Shared : public dap::ReaderWriter {
if
(
s
==
InvalidSocket
)
{
if
(
s
==
InvalidSocket
)
{
return
0
;
return
0
;
}
}
return
recv
(
s
,
reinterpret_cast
<
char
*>
(
buffer
),
static_cast
<
int
>
(
bytes
),
0
);
auto
len
=
recv
(
s
,
reinterpret_cast
<
char
*>
(
buffer
),
static_cast
<
int
>
(
bytes
),
0
);
return
(
len
<
0
)
?
0
:
len
;
}
}
bool
write
(
const
void
*
buffer
,
size_t
bytes
)
{
bool
write
(
const
void
*
buffer
,
size_t
bytes
)
{
...
...
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