base socket: correctly invoke callback if socket is down (fd = -1)