I have a situation that occurred yesterday during development that requires some more research on my end but was wondering if anyone would have some suggestions.
The case was I was talking to a server via Arduino and a W5100 EthernetShield. During communications wit hthe server I got an invalid response. This causes the event to fail and it is rescheduled, for an IP update. Specifically I am talking to the checkip.dyndns.org server.
What the log shows is that the socket was attempted to be closed via the following code.
[code:1:456c03eeea]
Sub Server_CloseSocket(socketnum as byte)
#if debugflag
Print #Debugchannel, "Server_Server_CloseSocket, disconnecting and closing socket ";socketnum
#endif
SocketDisconnect socketnum ' W5x00 disconnect before close
SocketClose socketnum
End Sub
[/code:1:456c03eeea]
The subroutine WAS invoked but at the next scheduled event, socket 0 WAS NOT available and socket 1 was used. Socketnum was equal to at the first attempt when I got an invalid response.
So my question is this....What would cause the socket to NOT disconnect when instructed to do so??
Data in a buffer that hasn't been read yet?
I thought a disconnect meant disconnect.... ??? This is concerning to me as eventually I will have no free sockets.
TIA,
Mark
[b:456c03eeea][color=red:456c03eeea](BASCOM-AVR version : v2.0.7.7 , Latest : 2.0.7.6 )[/b:456c03eeea][/color:456c03eeea]
↧