armeria icon indicating copy to clipboard operation
armeria copied to clipboard

Rename `SessionProtocolNegotiationException` to `SessionCreationTimeoutException` when session creation timed out

Open Lincong opened this issue 1 year ago • 4 comments

SessionProtocolNegotiationException can be thrown from a few places in Armeria client side. However, it is more accurate to create a new type of exception named SessionCreationTimeoutException and throw it here instead of throwing SessionProtocolNegotiationException. Because SessionCreationTimeoutException is a more accurate name describing the what has gone wrong in this scenario.

Full discussion context on Discord is here. Useful info here is:

"When you make a connection attempt, a server will usually accept an incoming connection at O/S level, even if you did not call ServerSocket.accept() because OS's network stack keeps the accepted the connection it its 'backlog'. Therefore, it is practically impossible to distinguish between the two unfortunately. (Because the client will perceive the connection as established anyway unleass the server is under very high load, filling the socket accept backlog)"

Lincong avatar Nov 14 '23 05:11 Lincong

/ Assign to me ?

misselvexu avatar Apr 26 '24 03:04 misselvexu

For sure.

ikhoon avatar Apr 26 '24 06:04 ikhoon

For sure.

I found that this problem has been solved in the latest version and this ISSUE can be turned off~ !

misselvexu avatar May 11 '24 09:05 misselvexu

Is this solved? I am failing to find the related PR.

ikhoon avatar Jun 07 '24 08:06 ikhoon