Also fix possible race condition which could in theory lead to "command out of sync"
and a buffer overflow that could happen on incorrect server response.
Identify clients by pointers instead of peer_fd as peer may be dropped
and reconnected between callbacks
Yeah maybe I need some Rust, but ... maybe in the future :)