netmgr: handle errors properly in accept_connection.
If a connection was closed early (right after accept()) an assertion that assumed that the connection was still alive could be triggered in accept_connection. Handle those errors properly and not with assertions, free all the resources afterwards.