Changed over AgentServer to pattern after the new StratumServer

* Fixed disconnect bugs with the StratumServer