asyn icon indicating copy to clipboard operation
asyn copied to clipboard

Nonblocking connect using poll

Open ericonr opened this issue 11 months ago • 7 comments
trafficstars

Replacing #210

ericonr avatar Dec 03 '24 15:12 ericonr

:x: Build asyn 1.0.283 failed (commit https://github.com/epics-modules/asyn/commit/ae16b99eb5 by @ericonr)

AppVeyorBot avatar Dec 03 '24 19:12 AppVeyorBot

The failure seems unrelated: https://ci.appveyor.com/project/MarkRivers/asyn/builds/51101760/job/iyv53p19fkkop0vd

ericonr avatar Dec 03 '24 19:12 ericonr

:x: Build asyn 1.0.284 failed (commit https://github.com/epics-modules/asyn/commit/b8bbe39652 by @ericonr)

AppVeyorBot avatar Dec 03 '24 22:12 AppVeyorBot

@ericonr I would like to merge this soon. Can you create a Github issue that describes the problem this PR is designed to fix, and some simple observations that will confirm that it is working? I think it fixes a problem like this:

drvAsynIPPortConfigure("MyPort", "ip_address", 0, 0, 0)
asynOctetSetInputEos("MyPort",0,"\r")
asynOctetSetOutputEos("MyPort",0,"\r")

If ip_address is not reachable then the asynOcterSetInputEos() asynOcterSetOutputEos() commands will each hang for a long time because the port is locked waiting for the connect() to time out. Is this correct?

MarkRivers avatar Feb 12 '25 23:02 MarkRivers

Hi @MarkRivers

I have updated the commit message to include a better description of the problem being solved, as well as what was used to confirm it's working. Should I still open an issue, or is the commit description enough?

If ip_address is not reachable then the asynOcterSetInputEos() asynOcterSetOutputEos() commands will each hang for a long time because the port is locked waiting for the connect() to time out. Is this correct?

That is correct!

ericonr avatar Mar 11 '25 18:03 ericonr

:x: Build asyn 1.0.296 failed (commit https://github.com/epics-modules/asyn/commit/7ab23bcecf by @ericonr)

AppVeyorBot avatar Mar 12 '25 11:03 AppVeyorBot

@MarkRivers @ericonr There is already an open issue for this (https://github.com/epics-modules/asyn/issues/103). I have backported the patches to our local branch and rolled it out to some of our IOCs. Works fine and no problems so far. Thanks for your work to fix this!

chrschroeder avatar Mar 13 '25 15:03 chrschroeder