Skip to content

Commit

Permalink
native: Throw SocketClosedException subclass upon accept error
Browse files Browse the repository at this point in the history
This simplifies unit testing.
  • Loading branch information
kohlschuetter committed Feb 14, 2024
1 parent ed3d2e6 commit a30644e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion junixsocket-native/src/main/c/accept.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ JNIEXPORT jboolean JNICALL Java_org_newsclub_net_unix_NativeUnixSocket_accept

int serverHandle = _getFD(env, fdServer);
if(serverHandle < 0) {
_throwException(env, kExceptionSocketException, "Socket is closed");
_throwException(env, kExceptionSocketClosedException, "Socket is closed");
return false;
}

Expand Down

0 comments on commit a30644e

Please sign in to comment.