You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/io/fusionauth/http/server/internal/HTTPWorker.java
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -256,13 +256,14 @@ public void run() {
256
256
logger.debug("[{}] Closing socket with status [{}]. Bad request, failed to parse request. Reason [{}] Parser state [{}]", Thread.currentThread().threadId(), Status.BadRequest, e.getMessage(), e.getState());
257
257
closeSocketOnError(response, Status.BadRequest);
258
258
} catch (SocketExceptione) {
259
-
// This should only happen when the server is shutdown and this thread is waiting to read or write. In that case, this will throw a
260
-
// SocketException and the thread will be interrupted. Since the server is being shutdown, we should let the client know.
259
+
// When the HTTPServerThread shuts down, we will interrupt each client thread, so debug log it accordingly.
260
+
// - This will cause the socket to throw a SocketException, so log it.
261
261
if (Thread.currentThread().isInterrupted()) {
262
-
// Close socket only. We do not want to potentially delay the shutdown at all.
263
262
logger.debug("[{}] Closing socket. Server is shutting down.", Thread.currentThread().threadId());
264
-
closeSocketOnly(CloseSocketReason.Expected);
263
+
} else {
264
+
logger.debug("[{}] Closing socket. The socket was closed by a client, proxy or otherwise.", Thread.currentThread().threadId());
265
265
}
266
+
closeSocketOnly(CloseSocketReason.Expected);
266
267
} catch (IOExceptione) {
267
268
logger.debug(String.format("[%s] Closing socket with status [%d]. An IO exception was thrown during processing. These are pretty common.", Thread.currentThread().threadId(), Status.InternalServerError), e);
0 commit comments