ViaQ / Relp

Native RELP protocol implementation in Ruby
MIT License
7 stars 4 forks source link

Improve length mismatch warning #16

Open jvymazal opened 7 years ago

jvymazal commented 7 years ago

Currently (as of 0.2.0) there is lost data exception raised even on valid connection close with all the data transferred. Investigate cause of this and improve the length mismatch detection

dhlavac commented 7 years ago

Can you send me some example of lost data transaction ?

jvymazal commented 7 years ago

Pretty much any case where you shut down connected client while server is still running:

-0400 [debug]: relp/server.rb:111:communication_processing: Communication processing
-0400 [error]: relp/relp_protocol.rb:76:check_message_length: Lost data
-0400 [warn]: relp/server.rb:50:rescue in block (2 levels) in run: Relp error: Relp::MissingData Data length is not same as received data
-0400 [debug]: relp/relp_protocol.rb:23:frame_write: Writing Frame {:txnr=>0, :command=>"close", :message=>"0"}
-0400 [debug]: relp/server.rb:91:server_close_message: Server close message send
-0400 [debug]: relp/server.rb:57:block (2 levels) in run: Closing client socket=47071688146200
-0400 [info]: relp/server.rb:58:block (2 levels) in run: Client from ip 127.0.0.1 closed

the same happens both with and without SSL

onet-git commented 4 years ago

Fixed in #19