Skip to content

Commit

Permalink
[proto_ws(s)] trace web socket connect failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ionutrazvanionita committed Mar 15, 2017
1 parent 3be4f29 commit 2919f96
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/proto_ws/ws_handshake_common.h
Expand Up @@ -374,6 +374,15 @@ static inline int ws_client_handshake(struct tcp_connection *con)
/* connection will be released */
return size;
error:
/* ws_start_handshake must be completed so trace_ws was called
* in order to get here so we're safe */
if ( ((struct ws_data *) con->proto_data)->dest ) {
if ( complete_ws_trace( con, TRANS_TRACE_FAILURE,
0, &CONNECT_FAIL) < 0 ) {
LM_ERR("failed to trace ws connect failure!\n");
}
}

return -1;
}

Expand Down

0 comments on commit 2919f96

Please sign in to comment.