You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/11/15 08:51:33 UTC

[GitHub] [nifi-minifi-cpp] martinzink commented on pull request #1430: MINIFICPP-1922 Implement ListenUDP processor

martinzink commented on PR #1430:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1430#issuecomment-1314983966

   I've tried creating a test utility that creates a socket on port 0. https://github.com/apache/nifi-minifi-cpp/pull/1430/commits/f7822f8282a3882520f88b437e291fff40066c4c (so the OS assigns a random port to it), then close the socket and return the port to bind to.
   
   Unfortunately this could leave the port on TIME_WAIT (which could be worked-around by setting reuse_address (which we may very well want to use besides this, so restarting the processor on the same port can work without hiccups), but due to race conditions sometimes the port is not even in the TIME_WAIT state when the processor wants to bind to it.
   
   The proper solution would be to directly set the processor (or utility) to port 0. And get the listening port out after the socket/acceptor is already up and running, but this would require a larger refactor (both tests and prod code as well), since I am already in the process to rework these codes in [MINIFICPP-1979](https://issues.apache.org/jira/browse/MINIFICPP-1979), it would make sense to do this during that refactor.
   
   @adam-markovics @arpadboda How about I revert the relevant parts from https://github.com/apache/nifi-minifi-cpp/pull/1430/commits/f7822f8282a3882520f88b437e291fff40066c4c and properly implement the feature in/after [MINIFICPP-1979](https://issues.apache.org/jira/browse/MINIFICPP-1979) I've already created a ticket for this [MINIFICPP-1985](https://issues.apache.org/jira/browse/MINIFICPP-1985)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org