Skip to content

Commit

Permalink
Supress errors when gracefully timing out
Browse files Browse the repository at this point in the history
Thanks Chris Maciejewski for reporting and providing testing environment

(cherry picked from commit 87e42b38fc8def1f3202b8036c4aa560ea69bee9)
  • Loading branch information
razvancrainea committed Apr 5, 2017
1 parent 5339b9b commit a49a762
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modules/proto_ws/proto_ws.c
Expand Up @@ -79,6 +79,8 @@ static str trace_destination_name = {NULL, 0};
trace_dest t_dst;
trace_proto_t tprot;

extern int is_tcp_main;

/* module tracing parameters */
static int trace_is_on_tmp=1, *trace_is_on;
static char* trace_filter_route;
Expand Down Expand Up @@ -252,7 +254,7 @@ static void ws_conn_clean(struct tcp_connection* c)
if (!d)
return;

if (c->state == S_CONN_OK) {
if (c->state == S_CONN_OK && !is_tcp_main) {
switch (d->code) {
case WS_ERR_NOSEND:
break;
Expand Down
4 changes: 3 additions & 1 deletion modules/proto_wss/proto_wss.c
Expand Up @@ -90,6 +90,8 @@ static str trace_destination_name = {NULL, 0};
trace_dest t_dst;
trace_proto_t tprot;

extern int is_tcp_main;

/* module tracing parameters */
static int trace_is_on_tmp=1, *trace_is_on;
static char* trace_filter_route;
Expand Down Expand Up @@ -278,7 +280,7 @@ static void ws_conn_clean(struct tcp_connection* c)
if (!d)
return;

if (c->state == S_CONN_OK) {
if (c->state == S_CONN_OK && !is_tcp_main) {
switch (d->code) {
case WS_ERR_NOSEND:
break;
Expand Down

0 comments on commit a49a762

Please sign in to comment.