Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
capnproto
Commits
26e6cfd3
Commit
26e6cfd3
authored
Dec 23, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't spew errors to the console whenever RPC gets disconnected. Fixes #163.
parent
48a5daaa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
rpc.c++
c++/src/capnp/rpc.c++
+11
-2
debug.c++
c++/src/kj/debug.c++
+10
-0
No files found.
c++/src/capnp/rpc.c++
View file @
26e6cfd3
...
@@ -359,8 +359,17 @@ public:
...
@@ -359,8 +359,17 @@ public:
});
});
// Indicate disconnect.
// Indicate disconnect.
disconnectFulfiller
->
fulfill
(
DisconnectInfo
{
auto
shutdownPromise
=
connection
.
get
<
Connected
>
()
->
shutdown
()
connection
.
get
<
Connected
>
()
->
shutdown
().
attach
(
kj
::
mv
(
connection
.
get
<
Connected
>
()))
});
.
attach
(
kj
::
mv
(
connection
.
get
<
Connected
>
()))
.
then
([]()
->
kj
::
Promise
<
void
>
{
return
kj
::
READY_NOW
;
},
[](
kj
::
Exception
&&
e
)
->
kj
::
Promise
<
void
>
{
// Don't report disconnects as an error.
if
(
e
.
getType
()
!=
kj
::
Exception
::
Type
::
DISCONNECTED
)
{
return
kj
::
mv
(
e
);
}
return
kj
::
READY_NOW
;
});
disconnectFulfiller
->
fulfill
(
DisconnectInfo
{
kj
::
mv
(
shutdownPromise
)
});
connection
.
init
<
Disconnected
>
(
kj
::
mv
(
networkException
));
connection
.
init
<
Disconnected
>
(
kj
::
mv
(
networkException
));
}
}
...
...
c++/src/kj/debug.c++
View file @
26e6cfd3
...
@@ -80,6 +80,9 @@ Exception::Type typeOfErrno(int error) {
...
@@ -80,6 +80,9 @@ Exception::Type typeOfErrno(int error) {
#endif
#endif
return
Exception
::
Type
::
OVERLOADED
;
return
Exception
::
Type
::
OVERLOADED
;
#ifdef ENOTCONN:
case
ENOTCONN
:
#endif
#ifdef ECONNABORTED
#ifdef ECONNABORTED
case
ECONNABORTED
:
case
ECONNABORTED
:
#endif
#endif
...
@@ -120,6 +123,13 @@ Exception::Type typeOfErrno(int error) {
...
@@ -120,6 +123,13 @@ Exception::Type typeOfErrno(int error) {
#endif
#endif
#if defined(EOPNOTSUPP) && EOPNOTSUPP != ENOTSUP
#if defined(EOPNOTSUPP) && EOPNOTSUPP != ENOTSUP
case
EOPNOTSUPP
:
case
EOPNOTSUPP
:
#endif
#ifdef ENOPROTOOPT
case
ENOPROTOOPT
:
#endif
#ifdef ENOTSOCK
// This is really saying "syscall not implemented for non-sockets".
case
ENOTSOCK
:
#endif
#endif
return
Exception
::
Type
::
UNIMPLEMENTED
;
return
Exception
::
Type
::
UNIMPLEMENTED
;
...
...
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