diff --git a/libhttp/httpconnection.c b/libhttp/httpconnection.c index 95a63cd..95648e7 100644 --- a/libhttp/httpconnection.c +++ b/libhttp/httpconnection.c @@ -430,7 +430,7 @@ void destroyHttpConnection(struct HttpConnection *http) { http->peerName ? http->peerName : "???", http->peerPort); } httpShutdown(http, http->closed ? SHUT_WR : SHUT_RDWR); - dcheck(!close(http->fd)); + dcheck(!close(http->fd) || errno != EBADF); free(http->peerName); free(http->url); free(http->method);