[Mono-list] SerialPort.ReadTimeout = 0
Daniel Hughes
trampster at gmail.com
Tue Jul 20 06:03:41 EDT 2010
If you try and set ReadTimeout to Zero in mono on ubuntu 10.04 you get
a ArgumentOutOfrangeException.
However the MSDN documentation says that Zero is OK, It says that
ArugmentOutOfRangeException is thrown if:
"The read time-out value is less than zero and not equal to InfiniteTimeout."
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.readtimeout.aspx
However I do know why mono was implemented this way it is because the
MSDN documentation used to be wrong.
http://connect.microsoft.com/VisualStudio/feedback/details/255189/bug-in-documentation-for-serialport-readtimeout-property
So what has happened is that the Mono implementation was implemented
according to buggy documentation.
We have code which we need to run on ubuntu which we can not because
of this. I'm not exactly sure why one would set ReadTimeout to zero. I
will investigate why our code is doing this and will probably have to
work around the problem.
However the problem still stands that the mono implementation is
wrong. What is the best way to handle this?
Should I raise a bug? would it do any good? The last bug I raised on
the mono serial port implementation still exists and has seen no
activity for over a year now.
More information about the Mono-list
mailing list