This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

Client is waiting for FIN flag from server for 30 sec

asked Nov 01 '17

updated Nov 01 '17

When I initialize TCP connection and send data, my application (client) delays for 30 seconds. Via Wireshark I see that response body is already received (15,16 packets), however the app waits for FIN packet from server (17 packet).

Packets snapshot via wireshark: https://www.dropbox.com/s/il8zkik5w88...

How can I shrink the delay?

Comments

@User 47838: I have reopened the question again. As accepting the answer which solved the question is enough. Closing is not necessary.

User 23750 ( Nov 02 '17 )

1 Answer

1

answered Nov 01 '17

The answer is, it is application related. Normally the client initialized a session and he also ends a session. As he is the only one who knows, if he wants more data from the server or not. But in your case the client does not close the session. So the servers ends the session nicely by sending a fin packets after 30 seconds. So from my point of view, the question should be, why does the client not close the session itself.

Comments

I agree. This is probably caused by the application logic - the programmer should close the socket when everything is done, instead of letting it run into the time out.

User 96950 ( Nov 01 '17 )

Thank you! The problem is application related indeed. Resolved it by changing from blocking socket implementation to non-blocking.

User 47838 ( Nov 02 '17 )
cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.