NETCONNECTON calls the "sendready" instuctionlist one
too many times. According to the manual, the first
time sendready is run is when FMSLogo successfully
issues the connection. The second time sendready is run
is when FMSLogo actually connects to the remote
machine. The third time sendready is run is when
FMSLogo is ready to send on the connection. After that,
sendready is run when FMSLogo is ready to send an
earlier call to NETCONNECTSENDVALUE failed.
So if you create a client that never sends, you expect
at most three calls. However, FMSLogo will run it four
times. The fourth time happens when the remote side
closes, which is silly, because that has nothing to do
with the local side sending.
I have reproduced this in MSWLogo 6.5b.
How Reproducible:
Every Time
Steps to Reproduce
1) Run NETCONNECTON with a sendready that prints out
whenever it has been called. Connect to a server that
sends data upon connection.
2) Once you have received the data from the server,
call NETCONNECTOFF.
What Happens:
The sendready input is called four times.
Expected Result:
The sendready input is called three times.
NOTE: because this is a tedious repro scenario, I have
submitted a regression test to network.lgo.
I have committed a fix for this so that neither NETACCEPTON nor NETCONNECTON will run the "sendready" instruction list when the remote host initiates a TCP half-close. The fix will be available in FMSLogo 8.0.0.
This fix may impact compatibility with FMSLogo programs which inadvertently relied on the extra execution of :sendready.