Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/main/java/com/ibm/disni/RdmaServerEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@ public C accept() throws IOException {
}
}
C endpoint = requested.poll();
logger.info("connect request received");
endpoint.accept();

// a null endpoint gets returned if listening endpoint closes
if (endpoint != null) {
logger.info("connect request received");
endpoint.accept();
}
return endpoint;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure applications are handling the case correctly if null is returned here? Might as well throw an exception (Much like before)?

} catch (Exception e) {
throw new IOException(e);
Expand Down