Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
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
DEMO
spring-boot
Commits
0b828db6
Commit
0b828db6
authored
Apr 03, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16406 from izeye
* pr/16406: Check for Reactor Netty disconnected client errors
parents
52ebf20c
9fae1e5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
AbstractErrorWebExceptionHandler.java
.../web/reactive/error/AbstractErrorWebExceptionHandler.java
+10
-5
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java
View file @
0b828db6
...
...
@@ -64,7 +64,8 @@ public abstract class AbstractErrorWebExceptionHandler
* Currently duplicated from Spring WebFlux HttpWebHandlerAdapter.
*/
private
static
final
Set
<
String
>
DISCONNECTED_CLIENT_EXCEPTIONS
=
new
HashSet
<>(
Arrays
.
asList
(
"ClientAbortException"
,
"EOFException"
,
"EofException"
));
Arrays
.
asList
(
"AbortedException"
,
"ClientAbortException"
,
"EOFException"
,
"EofException"
));
private
static
final
Log
logger
=
HttpLogging
.
forLogName
(
AbstractErrorWebExceptionHandler
.
class
);
...
...
@@ -268,10 +269,14 @@ public abstract class AbstractErrorWebExceptionHandler
private
boolean
isDisconnectedClientError
(
Throwable
ex
)
{
String
message
=
NestedExceptionUtils
.
getMostSpecificCause
(
ex
).
getMessage
();
message
=
(
message
!=
null
)
?
message
.
toLowerCase
()
:
""
;
String
className
=
ex
.
getClass
().
getSimpleName
();
return
(
message
.
contains
(
"broken pipe"
)
||
DISCONNECTED_CLIENT_EXCEPTIONS
.
contains
(
className
));
if
(
message
!=
null
)
{
String
text
=
message
.
toLowerCase
();
if
(
text
.
contains
(
"broken pipe"
)
||
text
.
contains
(
"connection reset by peer"
))
{
return
true
;
}
}
return
DISCONNECTED_CLIENT_EXCEPTIONS
.
contains
(
ex
.
getClass
().
getSimpleName
());
}
private
void
logError
(
ServerRequest
request
,
ServerResponse
response
,
...
...
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