Version 2.1.1; backport #85, avoid memory leak reading from socket.