Connects but immediately disconnects

I can see the logs for onConnect and onDisconnect being called but
whatever that eofexception is disconnecting it.