2
0
Fork 0

Compare commits

..

No commits in common. "b033a4fcb450b9233f84154fc26eaae566808b65" and "850aea7a5d761e17cca5966a0d5434dee4bd942d" have entirely different histories.

5 changed files with 3 additions and 5 deletions

View File

@ -506,7 +506,6 @@ void li_iostream_acquire(liIOStream* iostream) {
} }
void li_iostream_release(liIOStream* iostream) { void li_iostream_release(liIOStream* iostream) {
if (iostream == NULL) return;
li_stream_release(&iostream->stream_in); li_stream_release(&iostream->stream_in);
li_stream_release(&iostream->stream_out); li_stream_release(&iostream->stream_out);
} }
@ -527,6 +526,8 @@ int li_iostream_reset(liIOStream *iostream) {
li_stream_disconnect(&iostream->stream_out); li_stream_disconnect(&iostream->stream_out);
li_stream_disconnect_dest(&iostream->stream_in); li_stream_disconnect_dest(&iostream->stream_in);
li_iostream_release(iostream);
return fd; return fd;
} }

View File

@ -19,6 +19,7 @@ void li_stream_simple_socket_close(liIOStream *stream, gboolean aborted) {
} }
if (aborted || stream->in_closed) { if (aborted || stream->in_closed) {
li_iostream_acquire(stream);
fd = li_iostream_reset(stream); fd = li_iostream_reset(stream);
if (-1 != fd) { if (-1 != fd) {
shutdown(fd, SHUT_RDWR); shutdown(fd, SHUT_RDWR);

View File

@ -200,7 +200,6 @@ static void backend_close(liBackendPool *bpool, liWorker *wrk, liBackendConnecti
li_stream_simple_socket_close(ctx->iostream, FALSE); li_stream_simple_socket_close(ctx->iostream, FALSE);
fd = li_iostream_reset(ctx->iostream); fd = li_iostream_reset(ctx->iostream);
LI_FORCE_ASSERT(-1 == fd); LI_FORCE_ASSERT(-1 == fd);
li_iostream_release(ctx->iostream);
ctx->iostream = NULL; ctx->iostream = NULL;
} }
li_stream_reset(&ctx->fcgi_in); li_stream_reset(&ctx->fcgi_in);
@ -282,7 +281,6 @@ static void fastcgi_reset(liFastCGIBackendContext *ctx) {
li_stream_simple_socket_close(iostream, TRUE); li_stream_simple_socket_close(iostream, TRUE);
fd = li_iostream_reset(iostream); fd = li_iostream_reset(iostream);
LI_FORCE_ASSERT(-1 == fd); LI_FORCE_ASSERT(-1 == fd);
li_iostream_release(iostream);
li_stream_disconnect(&ctx->fcgi_out); li_stream_disconnect(&ctx->fcgi_out);
li_stream_disconnect_dest(&ctx->fcgi_in); li_stream_disconnect_dest(&ctx->fcgi_in);

View File

@ -213,7 +213,6 @@ static gboolean openssl_con_new(liConnection *con, int fd) {
ERROR(srv, "SSL_new: %s", ERR_error_string(ERR_get_error(), NULL)); ERROR(srv, "SSL_new: %s", ERR_error_string(ERR_get_error(), NULL));
fd = li_iostream_reset(conctx->sock_stream); fd = li_iostream_reset(conctx->sock_stream);
close(fd); close(fd);
li_iostream_release(conctx->sock_stream);
g_slice_free(openssl_connection_ctx, conctx); g_slice_free(openssl_connection_ctx, conctx);
return FALSE; return FALSE;
} }

View File

@ -28,7 +28,6 @@ class Test(GroupTest):
TestDirlist, TestDirlist,
TestRedirectDir, TestRedirectDir,
TestRedirectDirWithQuery, TestRedirectDirWithQuery,
TestRedirectDirWithQueryAndSpecialChars,
] ]
config = """ config = """