catch port_close