I've modified the code as shown below, but it doesn't help. Still the same problem.
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval)
{
previousMillis = currentMillis;
if(radio.write(msg, sizeof(int)))
{
Serial.println(msg[0]);
}
else
{
Serial.println("Failed!");
}
}