#1 2017-05-09 11:23:16

hnb
Member
Registered: 2015-06-15
Posts: 290

Unhandled FIN packet flag.

Hi,

I am working with TCP a little and during usage of mORMot (TDDDSocketThread exactly) I discovered the problem:

uc?export=view&id=0B4PZhd929_ZRTG1Gekw4ckprTWs

mORMot can't detect FIN flag (which means end of connection). May be worth to rethink implementation of SynCrtSock.InputSock. Some tip from stackoverflow:

http://stackoverflow.com/a/17705579/278086

I am unable to detect from TDDDSocketThread level packet with FIN flag (from client side). After FIN action (37) my server/client tries to send new packet (39) which is rejected (40) and data are lost. In this step (40) is executed TDDDSocketThread.InternalExecuteDisconnect which is not correct at all. The connection should be closed probably in step after FIN (38) - I guess: packet with ACK and FIN.

Last edited by hnb (2017-05-09 11:32:54)


best regards,
Maciej Izak

Offline

Board footer

Powered by FluxBB