Skip to content

Commit b63b700

Browse files
authored
Merge pull request #14 from quelgar/fix-bsp-arm64
Make JNI server socket keep using JNI when accepting connections
2 parents d5e67af + 0248630 commit b63b700

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.4.4
1+
sbt.version=1.5.3

src/main/java/org/scalasbt/ipcsocket/UnixDomainServerSocket.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public class UnixDomainServerSocket extends ServerSocket {
5959
private boolean isBound;
6060
private boolean isClosed;
6161
private final UnixDomainSocketLibraryProvider provider;
62+
private final boolean useJNI;
6263

6364
public static class UnixDomainServerSocketAddress extends SocketAddress {
6465
private final String path;
@@ -105,6 +106,7 @@ public UnixDomainServerSocket(int backlog, String path) throws IOException {
105106
*/
106107
public UnixDomainServerSocket(int backlog, String path, boolean useJNI) throws IOException {
107108
try {
109+
this.useJNI = useJNI;
108110
provider = UnixDomainSocketLibraryProvider.get(useJNI);
109111
fd = new AtomicInteger(provider.socket(PF_LOCAL, SOCK_STREAM, 0));
110112
this.backlog = backlog;
@@ -153,7 +155,7 @@ public Socket accept() throws IOException {
153155
}
154156
try {
155157
int clientFd = provider.accept(fd.get());
156-
return new UnixDomainSocket(clientFd);
158+
return new UnixDomainSocket(clientFd, useJNI);
157159
} catch (NativeErrorException e) {
158160
throw new IOException(e);
159161
}

0 commit comments

Comments
 (0)