Skip to content

Commit a62d352

Browse files
committed
catch SocketException treat like ConnectionClosedException
1 parent 41401f8 commit a62d352

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

build.savant

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dropWizardVersion = "3.2.6"
1919
easyMockVersion = "5.2.0"
2020
freemarkerVersion = "2.3.32"
2121
fusionAuthJWTVersion = "5.3.2"
22-
javaHTTPVersion = "1.1.0"
22+
javaHTTPVersion = "1.1.2-{integration}"
2323
jsonPatchVersion = "1.13.0"
2424
guavaVersion = "32.1.2-jre"
2525
guiceVersion = "6.0.0"
@@ -29,7 +29,7 @@ logbackVersion = "1.5.13"
2929
slf4jVersion = "2.0.13"
3030
testngVersion = "7.8.0"
3131

32-
project(group: "org.primeframework", name: "prime-mvc", version: "5.3.1", licenses: ["ApacheV2_0"]) {
32+
project(group: "org.primeframework", name: "prime-mvc", version: "5.3.2", licenses: ["ApacheV2_0"]) {
3333
workflow {
3434
fetch {
3535
// Dependency resolution order:

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>org.primeframework</groupId>
77
<artifactId>prime-mvc</artifactId>
8-
<version>5.3.1</version>
8+
<version>5.3.2</version>
99
<packaging>jar</packaging>
1010

1111
<name>FusionAuth App</name>
@@ -109,7 +109,7 @@
109109
<dependency>
110110
<groupId>io.fusionauth</groupId>
111111
<artifactId>java-http</artifactId>
112-
<version>1.1.0</version>
112+
<version>1.1.2-{integration}</version>
113113
<type>jar</type>
114114
<scope>compile</scope>
115115
<optional>false</optional>

prime-mvc.iml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@
126126
<orderEntry type="module-library">
127127
<library>
128128
<CLASSES>
129-
<root url="jar://$MODULE_DIR$/.savant/cache/io/fusionauth/java-http/1.1.0/java-http-1.1.0.jar!/" />
129+
<root url="jar://$USER_HOME$/.savant/cache/io/fusionauth/java-http/1.1.2-{integration}/java-http-1.1.2-{integration}.jar!/" />
130130
</CLASSES>
131131
<JAVADOC />
132132
<SOURCES>
133-
<root url="jar://$MODULE_DIR$/.savant/cache/io/fusionauth/java-http/1.1.0/java-http-1.1.0-src.jar!/" />
133+
<root url="jar://$USER_HOME$/.savant/cache/io/fusionauth/java-http/1.1.2-{integration}/java-http-1.1.2-{integration}-src.jar!/" />
134134
</SOURCES>
135135
</library>
136136
</orderEntry>

src/main/java/org/primeframework/mvc/PrimeMVCRequestHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package org.primeframework.mvc;
1717

1818
import java.io.Closeable;
19+
import java.net.SocketException;
1920

2021
import com.google.inject.Injector;
2122
import io.fusionauth.http.HTTPMethod;
@@ -71,9 +72,9 @@ public void handle(HTTPRequest request, HTTPResponse response) throws Exception
7172

7273
try {
7374
injector.getInstance(MVCWorkflow.class).perform(null);
74-
} catch (ConnectionClosedException e) {
75-
response.setStatus(408);
76-
logger.debug("Connection closed. This is generally caused due to a timeout, or a slow connection.", e);
75+
} catch (ConnectionClosedException | SocketException e) {
76+
// Catch, ignore and let java-http handle
77+
throw e;
7778
} catch (Throwable t) {
7879
logger.error("Error encountered", t);
7980
throw t; // java-http will cause this error to write back a 500 if possible and close the socket

0 commit comments

Comments
 (0)