adshares / ads

ADS Blockchain
Other
21 stars 4 forks source link

ADS client doesn't handle TCP connection FIN #146

Closed PawelPodkalicki closed 6 years ago

PawelPodkalicki commented 6 years ago

ADS client run as interactive console (no echo calls). Executed command was

{"run":"get_me"}

It returned correct data. After more than 5 seconds of inactivity same command returned

{
    "error": "read: End of file"
}
[1534421132] GetAccount reading error
[1534421132] ERROR reading global info talk
{
    "error": "Can't connect to server"
}

Wireshark logs shows that ADS node ends TCP connection (FIN) after about 5 seconds of client inactivity. ADS client doesn't handle termination. It send ACK but no FIN. Next request is sent using old connection. Wireshark logs are available in 20180816_end_of_file archive.

ADS client should handle TCP connection properly and start new connection for next request.

jzemlo commented 6 years ago

Fixed in v1.01