Skip to content

Commit 5d312dd

Browse files
committed
Working
1 parent d2950be commit 5d312dd

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

src/main/java/io/fusionauth/http/io/PushbackInputStream.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ public int read() throws IOException {
9191
return b1[0] & 0xFF;
9292
}
9393

94-
@Override
95-
public byte[] readAllBytes() throws IOException {
96-
return super.readAllBytes();
97-
}
98-
9994
public void setDelegate(InputStream delegate) {
10095
this.delegate = delegate;
10196
}

src/main/java/io/fusionauth/http/server/HTTPServerConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ public HTTPServerConfiguration withMaximumBytesToDrain(int maxBytesToDrain) {
450450
*/
451451
@Override
452452
public HTTPServerConfiguration withMinimumReadThroughput(long bytesPerSecond) {
453-
if (bytesPerSecond != -1 && bytesPerSecond < 1024) {
454-
throw new IllegalArgumentException("The minimum bytes per second must be greater than 1024. This should probably be faster than a 28.8 baud modem!");
453+
if (bytesPerSecond != -1 && bytesPerSecond < 512) {
454+
throw new IllegalArgumentException("The minimum bytes per second must be greater than 512. Note that the theoretical maximum transmission speed of a 28.8k is 28,800 bits /second, or 3,600 bytes /second. Maybe consider requiring the read throughput to be faster than a 28.8k modem.");
455455
}
456456

457457
this.minimumReadThroughput = bytesPerSecond;
@@ -462,8 +462,8 @@ public HTTPServerConfiguration withMinimumReadThroughput(long bytesPerSecond) {
462462
* {@inheritDoc}
463463
*/
464464
public HTTPServerConfiguration withMinimumWriteThroughput(long bytesPerSecond) {
465-
if (bytesPerSecond != -1 && bytesPerSecond < 1024) {
466-
throw new IllegalArgumentException("The minimum bytes per second must be greater than 1024. This should probably be faster than a 28.8 baud modem!");
465+
if (bytesPerSecond != -1 && bytesPerSecond < 512) {
466+
throw new IllegalArgumentException("The minimum bytes per second must be greater than 512. Note that the theoretical maximum transmission speed of a 28.8k is 28,800 bits /second, or 3,600 bytes /second. Maybe consider requiring the write throughput to be faster than a 28.8k modem.");
467467
}
468468

469469
this.minimumWriteThroughput = bytesPerSecond;

src/main/java/io/fusionauth/http/server/internal/HTTPServerThread.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,18 +193,8 @@ public void run() {
193193
ClientInfo client = iterator.next();
194194
Thread thread = client.thread();
195195
long threadId = thread.threadId();
196-
boolean threadIsAlive = thread.isAlive();
197-
var threadState = thread.getState();
198-
if (threadState == Thread.State.TERMINATED) {
199-
if (threadIsAlive) {
200-
System.out.println("[" + threadId + "] is alive in state [" + threadState + "]");
201-
}
202-
} else if (!threadIsAlive) {
203-
System.out.println("[" + threadId + "] is dead in state [" + threadState + "]");
204-
}
205-
206-
if (!threadIsAlive) {
207-
logger.debug("[{}] Remove dead client worker. Thread state [{}] Born [{}]. Died at age [{}] ms. Requests handled [{}].", threadId, threadState, client.getStartInstant(), client.getAge(), client.getHandledRequests());
196+
if (!thread.isAlive()) {
197+
logger.trace("[{}] Remove dead client worker. Born [{}]. Died at age [{}] ms. Requests handled [{}].", threadId, client.getStartInstant(), client.getAge(), client.getHandledRequests());
208198
iterator.remove();
209199
removedClientCount++;
210200
continue;

0 commit comments

Comments
 (0)