Switch done + if tcp message received case