core/socket: we may get ENOTCONN from socket_instantiate_service()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 1 Sep 2020 21:50:01 +0000 (23:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 2 Sep 2020 16:17:30 +0000 (18:17 +0200)
commit86e045ecefc404d4fccbeb78aa212ec4714a5763
tree629c60fc5f8ca09d7e972a8ac491127ef4c41645
parent2c0e46735b7beb57f792265a167a6b0a22522391
core/socket: we may get ENOTCONN from socket_instantiate_service()

This means that the connection was aborted before we even got to figure out
what the service name will be. Let's treat this as a non-event and close the
connection fd without any further messages.

Code last changed in 934ef6a5.
Reported-by: Thiago Macieira <thiago.macieira@intel.com>
With the patch:
systemd[1]: foobar.socket: Incoming traffic
systemd[1]: foobar.socket: Got ENOTCONN on incoming socket, assuming aborted connection attempt, ignoring.
...

Also, when we get ENOMEM, don't give the hint about missing unit.
src/core/socket.c