[SJS-170][TEST][WIP]: Write tests for socket channel connection
[SJS-171][BUG]: Fix for uncaught type error when doing reconnection attempt