Skip to content

Commit

Permalink
Fix pending_send_buf pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Chion82 committed Feb 3, 2017
1 parent 068a97f commit d45cd34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 336,7 @@ void handle_recv_stream() {
break;
}
LOG("Remote notifies closing. conv=%d", conv);
if (connection->pending_send_buf == 0) {
if (connection->pending_send_buf_len == 0) {
close_connection(connection);
} else {
pending_close_connection(connection);
Expand Down Expand Up @@ -385,6 385,7 @@ void close_connection(struct connection_info* connection) {
if (connection->pending_send_buf != NULL) {
free(connection->pending_send_buf);
}
connection->pending_send_buf = NULL;
connection->pending_send_buf_len = 0;

bzero(&((connection->write_io).io), sizeof(struct ev_io));
Expand Down

0 comments on commit d45cd34

Please sign in to comment.