There are a number of combining factors that are causing an error to be set here: the way mIRC handles OpenSSLs socket read/write/close/error events, how these are passed to socket routines to be processed, the fact that SSL events and non-SSL events trigger on SOCK* events slightly differently (which cannot be changed as this would break existing scripts), and so on.
In order to prevent this error from being set, quite a few changes to both SSL and non-SSL routines are required.
Normally, I would prefer not to make complicated changes to stable code to resolve a small issue that has been around for so long. However, I am currently adding support for CAP STARTTLS, which requires quite a few changes anyway, so I have gone ahead and implemented a fix for this issue.
The next public beta will require extensive testing to ensure backward compatibility with existing socket scripts.