End message loop if we get END_CONNECTION.