Presumably affects setUsesDTRDSRFlowControl: and setUsesDCDOutputFlowControl: too. The basic issue here is that these setters call -close, then subsequently call -open again. This used to work fine, but when I switched to using a dispatch_source for reading from the port, I made it so that -close asynchronously triggers the actual closure by cancelling the dispatch_source which in turn calls -reallyClosePort. So, here -close is called, then -open is called before-reallyClosePort is called.
Closing and reopening the port was done originally to work around what I assumed was a bug in (at least some) USB to serial drivers. Testing should be done to see if this is really still necessary. If it is, perhaps I can make it so that there's an optionally synchronous variant of close.
Presumably affects
setUsesDTRDSRFlowControl:
andsetUsesDCDOutputFlowControl:
too. The basic issue here is that these setters call-close
, then subsequently call-open
again. This used to work fine, but when I switched to using a dispatch_source for reading from the port, I made it so that-close
asynchronously triggers the actual closure by cancelling the dispatch_source which in turn calls-reallyClosePort
. So, here-close
is called, then-open
is called before-reallyClosePort
is called.Closing and reopening the port was done originally to work around what I assumed was a bug in (at least some) USB to serial drivers. Testing should be done to see if this is really still necessary. If it is, perhaps I can make it so that there's an optionally synchronous variant of
close
.