close the particular server socket in case of exception
notify agent of socket close in case of socketChannel and shutdown in case of serverSocketChannel

# Have differentiated the closing of a socket channel and a server socket channel and notification of their closure to the Agents
# In case of socket channels, onClose is fired.
# In case of server socket channels, onShutdown is fired