sock: Fix the generation of invalid events in the context of RMA READ operations
+ some minor code cleanup.