-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
De-static GPGNetServer #67
Conversation
ice-adapter/src/main/java/com/faforever/iceadapter/gpgnet/GPGNetServer.java
Outdated
Show resolved
Hide resolved
1e356b6
to
0082f26
Compare
try { | ||
// The socket declaration must not be moved into a try-with-resources block, as the socket must not be | ||
// closed. It is passed into the GPGNetClient. | ||
Socket socket = serverSocket.accept(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe can create a constructor in the GPGNetClient(ServerSocket serverSocket)
and get a socket in the constructor code. Assuming that the client should close the socket, and not try close in try/catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not even sure why it is split up in 2 classes. 1 class is probably sufficient and then keeps the reference to the socket. But that is out of scope of this PR.
ice-adapter/src/main/java/com/faforever/iceadapter/gpgnet/GPGNetServer.java
Outdated
Show resolved
Hide resolved
0082f26
to
a12e90f
Compare
Now you can merge |
No description provided.