fix log messages

pass the state through terminate and respect goaways