Maximum Reconnection and multiple reading of messages

This seems incorrect. fgets will read an entire line and ends when length - 1 bytes have been read, or a newline (which is included in the return value), or an EOF **(whichever comes first)**

As opposed to what it was doing before - reading until a specified length only.