Fixed Unix Domain Socket Patch#9086
Conversation
Owen1212055
left a comment
There was a problem hiding this comment.
Please wrap your diff in paper comments, and use fully qualified names to avoid imports.
|
@MarkusTieger Any chance you could revisit this PR and address Owen's comment? If you don't have time to update it we could update/supersede this ourselves. |
Sorry, i completely forgot about this pr. I will update it tomorrow and address the comments... |
|
If you need something to test: (Velocity 3 does not support it) |
Warriorrrr
left a comment
There was a problem hiding this comment.
Still missing some paper comments, will give this a test later today
| + // Paper start | ||
| + java.net.SocketAddress rawSocketAddress = connection.channel.remoteAddress(); | ||
| + java.net.InetAddress rawAddress = java.net.InetAddress.getLoopbackAddress(); | ||
| + if (rawSocketAddress != null && rawSocketAddress instanceof java.net.InetSocketAddress rawInetSocketAddress) { |
There was a problem hiding this comment.
Null check here can be removed here and in the other spot, the instanceof takes care of it
|
After some further discussion, this should properly address the API as well. if (this.socketAddr instanceOf InetSocketAddress inet) return inet.getAddress();
return getLoopback()and adding a new method that yields the plain socket addr. |
|
Would be great, if someone could rebase it, because there are conflicts and i never actually dealt with them in patches. |
|
tbh I don't want to deal with this pr anymore. |
It Fixes that an exception is thrown when using a Unix Domain Socket.
There was already a Pull Request for this, but i made a new one, because it has added a new patch instead of updating an existing: #9084