The socket routines only look for a $lf at the end of a line, they do not depend on a full $crlf. If there is a $cr before an $lf, it is also removed but it is not necessary.
What is happening is that if a line in the buffer does not end in a $lf and you previously used /sockread into a %var (meaning that you want $lf terminated lines), mIRC will not trigger the event again because there is no $lf terminated line in the buffer waiting to be read.
In your example, the line happens to be the last line sent by the server, so the only way to read it is to check in the SOCKCLOSE event if there is any data still in the buffer by using $sock().rq and then using /sockread -f to read it.
As far as I can tell, mIRC is behaving as expected, however many scripters may not not have anticipated this situation.
I could change the behaviour so that if a SOCKCLOSE event is triggered and there is still data in the buffer, a final SOCKREAD event is triggered. This would not work for scripts that use /sockread (without -f) which requires the line to end in a $lf. So in this final SOCKREAD, I would also need to change /sockread (without -f) to work like /sockread -f, forcing a read.
Sometimes it is difficult to know how far I should go to abstract away technicalities. Does anyone see any issues with the above change? Any backward compatibility issues?