Code in SocketPort._pending() returned instead of breaking, leading it to return None.