Updated listener to remove redundant getpeername request