When WebSocket connection error is occured, current implementation sends result as success becuase it tries to send result before reporting result. The error messahe also not shown because standard IOs are closed. Try to connect WebSocket before sending result to parent to fix this.