eos icon indicating copy to clipboard operation
eos copied to clipboard

Why don't we stop unix_server from listening in shutdown stage as well?

Open Elliot438b opened this issue 8 years ago • 7 comments

https://github.com/EOSIO/eos/blob/59626f1e6361df3b715e926ee13a9a8e84d177af/plugins/http_plugin/http_plugin.cpp#L550 add


      if(my->unix_server.is_listening())
         my->unix_server.stop_listening();

Elliot438b avatar Nov 27 '18 10:11 Elliot438b

We should also unlink the socket file. Pull requests gratefully accepted. Please branch from the develop branch.

jgiszczak avatar Nov 27 '18 20:11 jgiszczak

We should also unlink the socket file

Already does that

spoonincode avatar Nov 28 '18 02:11 spoonincode

@spoonincode Can you kindly show me the position of source code?

Elliot438b avatar Nov 28 '18 02:11 Elliot438b

https://github.com/EOSIO/eos/blob/59626f1e6361df3b715e926ee13a9a8e84d177af/plugins/http_plugin/include/eosio/http_plugin/local_endpoint.hpp#L205

spoonincode avatar Nov 28 '18 02:11 spoonincode

oh and here too, so it looks like stop_listenting() should remove it https://github.com/EOSIO/eos/blob/59626f1e6361df3b715e926ee13a9a8e84d177af/plugins/http_plugin/include/eosio/http_plugin/local_endpoint.hpp#L435

spoonincode avatar Nov 28 '18 02:11 spoonincode

Yes, I think the destructor is not enough. The shutdown stage needs explicitly call.

Elliot438b avatar Nov 28 '18 03:11 Elliot438b

Fix merged

spoonincode avatar Nov 29 '18 17:11 spoonincode