/sockwrite [-tnb] <name> [numbytes] <text|%var|&binvar>
The /sockwrite command queues info to be sent on the specified connection. mIRC will then try to send that info as quickly as it can. Once it has finished sending the info, it triggers the on sockwrite event so you can send more info if you need to.
This has been the description for the sockwrite command as long as I can remember. If the data was sent immediately there would be no point in the on sockwrite event, would there? You could just assume that as soon as the /sockwrite command finished the data was sent.
The behaviour may be different to what it was in previous versions, I don't know, but closing a socket immediately after attempting to send data is bad practice anyway. Use the on sockwrite event, that's what it's there for.