40 and when they had called in the apostles, they beat them and charged them not to speak in the name of Jesus, and let them go. 41 Then they left the presence of the council, rejoicing that they were counted worthy to suffer dishonor for the name. 42 And every day, in the temple and from house to house, they did not cease teaching and preaching that the Christ is Jesus.
The apostles were beaten and told no to teach about Jesus. So what did they do? They rejoiced that their suffering was in the name of Jesus and "did not cease to teach and preach in Jesus name"! One thing mattered to them - the good news about who Jesus is and what he has done. If their suffering draws attention to that, then praise God. And whether they were suffering or not, in prison or out, their life mission was to spread that news.