Fix accept() bug, which was using the wrong isRW for error conversion. Also fixed a debug issue where local_name is used uninitialised.