ASACORE-983: Add logic to handle the case when socket write blocks

Change-Id: Ie1c5764a89126e821940513e1319687da4c6334b
Signed-off-by: Inga Stotland <ingas@qce.qualcomm.com>