The packets are popped by the socket task which pops in each iteration. this causes problems if both worker connections are busy the popped packet would get dropped and the message would never get through to the server. This also causes performance issues as we are calling sender unit in every iteration which is not required. rather only call it in websocket launch task when the connection is aquired by the socket task. once connection is aquired we can pop the packet and pass it to the websocket.
Therefore all the socket now does is check for connection status and launch websocket if connections are available. The launched connection pops the packet from sender unit.
The packets are popped by the socket task which pops in each iteration. this causes problems if both worker connections are busy the popped packet would get dropped and the message would never get through to the server. This also causes performance issues as we are calling sender unit in every iteration which is not required. rather only call it in websocket launch task when the connection is aquired by the socket task. once connection is aquired we can pop the packet and pass it to the websocket.
Therefore all the socket now does is check for connection status and launch websocket if connections are available. The launched connection pops the packet from sender unit.