Fix : (reported by: miluebbe) catch bad protocol exception in daemons, like a telnet connexion. Fix #829