|Server disconection [message #1757827]
||Mon, 20 March 2017 11:54
| Adrian Orive
Registered: March 2017
While looking at the communication infrastucture source, I found a feature that is probably not intended.|
At line 108 eResp is being checked against e_Terminated, that matches e_InitTerminated. In case it is an e_Server you are setting eResp = e_Nothing saying servers will not send information on client termination and should silently start to listen again while what is actually silently bypassing is Server termination, not client ones.
The server before triggering INIT
The server after triggering INIT with QI = FALSE: as it can be seen, the output is the same that in the previous image. closeConnection() is being called but as no connection was opened it does nothing, then eResp is set to e_InitTerminated and then back to e_Nothing, so the output data is not even being updated nor the output events triggered.
The server after triggering INIT with QI = TRUE: the server is properly initialised.
The server after triggering INIT with QI = FALSE: a server shutdown would be expected and the connection gets closed properly as this time we do have an open conection. But the second part, setting and unsetting eResp and not updating the output data nor triggering the output events make the application unaware of this disconection.
What I think lines 108 to 117 were trying to do is detect some kind of error either on RSP or external events. Maybe eResp should have been e_ProcessDataNegative or some other error code but not e_Terminated as this turns Server disconnections quiet, not client errors.
Powered by FUDForum
. Page generated in 0.02051 seconds