close the port connection if a command couldn't be written. this will trigger an...