Close TCP socket if connection is accepted after server shutdown

Change-Id: I38570ba59a98acea7cbc6167bdc49181fa33c26c
Merge "Close TCP socket if connection is accepted after server shutdown"