WskSend returns STATUS_INVALID_DEVICE_STATE

Hi,

I am currently working on a Winsock Kernel driver. While transferring data between computers, after some data transfer has been successfully completed, the WskSend call starts returning 0xc0000184 (STATUS_INVALID_DEVICE_STATE). I have tried the same thing on VMs as well as physical machines and both seem to show the same issue, though it’s not as frequent on physical machines as on VM. I am using a virtualized Gigabit adapter on the VMs. Some internet links seem to point that is the sock is not bound then WskSend can return such errors, however in my case the socket is operational and has transferred quite a bit of data before it starts failing with this error.
Any help/pointers are highly appreciated.