Skip to content

Commit

Permalink
Fix missing errors for websockets.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Apr 17, 2019
1 parent 8531cb1 commit 32fde38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/websockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static int callback_mqtt(struct libwebsocket_context *context,
#ifdef WITH_TLS
mosq->ssl = NULL;
#endif
do_disconnect(db, mosq);
do_disconnect(db, mosq, MOSQ_ERR_CONN_LOST);
}
break;

Expand Down Expand Up @@ -425,7 +425,7 @@ static int callback_mqtt(struct libwebsocket_context *context,
}
libwebsocket_callback_on_writable(mosq->ws_context, mosq->wsi);
} else if (rc) {
do_disconnect(db, mosq);
do_disconnect(db, mosq, MOSQ_ERR_CONN_LOST);
return -1;
}
}
Expand Down

0 comments on commit 32fde38

Please sign in to comment.