[client] remove loops inside the state machine
[client] remove loops inside the state machine

mchalain/libhttpserver,ouistiti-project/libhttpserver,ouistiti-project/libhttpserver,mchalain/libhttpserver