No, you can only be attacked while you are offline. You will not be attacked the first minutes after you went offline to eliminate the possibility of an attack caused by a simple disconnect.