Message ID | 20230130113510.142836-2-daniel@braunwarth.dev |
---|---|
State | Accepted |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <swupdate+bncBAABBFGX32PAMGQED3VP5TY@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::438; helo=mail-wr1-x438.google.com; envelope-from=swupdate+bncbaabbfgx32pamgqed3vp5ty@googlegroups.com; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=ryFJ5j3l; dkim-atps=neutral Received: from mail-wr1-x438.google.com (mail-wr1-x438.google.com [IPv6:2a00:1450:4864:20::438]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P55j66K0Mz23j6 for <incoming@patchwork.ozlabs.org>; Mon, 30 Jan 2023 22:35:53 +1100 (AEDT) Received: by mail-wr1-x438.google.com with SMTP id r1-20020adfa141000000b002be28fd4a7bsf1846033wrr.12 for <incoming@patchwork.ozlabs.org>; Mon, 30 Jan 2023 03:35:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675078549; cv=pass; d=google.com; s=arc-20160816; b=hhLEqvtbVDHkM4x6VKjn74M317wggPJwBlc/raDGxZiwHthoJUDZib5MdqLiSjbpPL 8CR36qetceLB3beiUUd3W7+eMunY4reMmrcQ/otggerCjiOBwOXhnDyaHIAd/WdkCb2Z pTkH5zsJ+9qJ6AbePGRLmAnDoKa+/9XFTF0DtWF03zNTo5mlwAXHCR/II6gT9DhoYTmW 4qNifWjfriZEspUZuCsriqJwWEjHYaHU9oWnA7WeWdA7mUlv7R6f1hzdAFezex51utJD nO0FESIRPv4DayW3Z9h1efLSZYs0NEWf1/Xu7E7Gw0KNbb+sxahE26QniOS4INRJE7OL 6EWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=N4wj5XPoj6YP+MvVgug3MywczVYOuQe6wNKme6PqZtI=; b=Mv68v7nbOg2TehwprlgEuU2q7ltm9/pejE3BgCTdCHUflxDGCu0955iuNU2210H+5J rqsHmyNVQyBKyFhro5t45vs5v1CfNl3ZYZVLrBqSQWaOwJ8xyOwRMnkGiOm8A4lYIQNO Uuno42tIaCBF0QO7zozLbf38kFHqqcY4MZNSxJGY7EO+tgUEpFmQ5AABLoL9GC2KZisN g1y9RlKe0bO+3du7dg4oYW8NTUtZHhwk1XMzFbt2NVWd2aKJPkhkbaSLekLcLZD3UIfk 8mTfKSNwFnNR6YTai8jpF7hT5tyFEWaNmymmfmJEFjBjo1CyuRvSygHHLW1vyTdwz2q3 d4Vw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of daniel@braunwarth.dev designates 185.26.156.157 as permitted sender) smtp.mailfrom=daniel@braunwarth.dev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=N4wj5XPoj6YP+MvVgug3MywczVYOuQe6wNKme6PqZtI=; b=ryFJ5j3ldb8EnIQcqpmNQs38hotsaG8kTgD8fLH1hknfZgdcMkP+A1rSIepdndRpon ZJOE9pkcRs/tOnbKMJqEHuOJnhZVrGxH8irLD4uEboyCHS54Wyah97v3Ioo+1qsIIQmp qWOqL7XP8QZV9b9BNmp27DKVXnR8cDgc5yJtPvCTvYJZxsflb09QF4acBBsEJzAHAqfl 5Ti+bwAKvcPF6JFjBJIcR/zr721lwhRKv4ZmYTwcw/RD0TR/X/YsH3Tnf76tiZiwLS0S Yq2uJUeR4DZRdeKBJRTywJpEm71tlwTOEr5RgL0UcohIq4UYRLWEFui2AV3W4w+A48O5 rgRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=N4wj5XPoj6YP+MvVgug3MywczVYOuQe6wNKme6PqZtI=; b=2ze3ieTNu9eYiY1jmX3Yc0eOC5etTQklw2MVVhtrOyk5Pf8/+vJ9o6eYid75M1+wrg 95KbpVLo1XvJqGiITxawrc2mUK2X495zagDesjfwL1qqjLaKKkETmE5bQGVySio7DcrL yNL3GDyrZ0vJ0ZBhWsimLCT7B487KTwLWdDvvKaUrk/pEhDcwXYWPMGe6oPWSvwFsDxi AbZmlruqUnUDFsTLjkzXhIpuLjGoCfks3pAnK4q6Jml1aqp8STKBYcha5ZKTWoyGrTt/ ze2q6XEOy+GzQUEy3syHyfJhaUaLt+i4/qkFBHFzdGSzh+Fs1g4oVjW42VoTFmGHZAzV n89A== Sender: swupdate@googlegroups.com X-Gm-Message-State: AFqh2kpeR+kjrr4rFzY+cGLpwQdOIKS1mFTbIh6z4FA23CuYAmyscHug BMGg5rAIc/CrMVDypwZM16k= X-Google-Smtp-Source: AMrXdXtm6PJKpFpRmz61ibjhx49zEqsP0AO7UKG7W1QMp9xMegQ+9Nup8lQONaZaGA0jCr10IbkPGQ== X-Received: by 2002:adf:b64d:0:b0:2ba:ed1f:bc66 with SMTP id i13-20020adfb64d000000b002baed1fbc66mr2167545wre.305.1675078548823; Mon, 30 Jan 2023 03:35:48 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:e449:0:b0:2be:34f5:ab03 with SMTP id t9-20020adfe449000000b002be34f5ab03ls1156649wrm.3.-pod-prod-gmail; Mon, 30 Jan 2023 03:35:47 -0800 (PST) X-Received: by 2002:adf:dcc5:0:b0:2bf:de97:f3f8 with SMTP id x5-20020adfdcc5000000b002bfde97f3f8mr6753291wrm.28.1675078547627; Mon, 30 Jan 2023 03:35:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675078547; cv=none; d=google.com; s=arc-20160816; b=l/qkoK1PDh1Jcf6bKolr/u83tUkedCl+5wc7m4B2JGqzeb+egNUCAgBundi83X/rs/ sWkReE7lWsjCQdHhzGOjOTfTDD2oatviVJLvFJ7recjvZQeWCQlwX7ZugZzn3ICJU2QT rFVzy+MNFqhIqU67QhxcW+pgTdjk3Pub3vjuiBiyucaeN3O1KAB3GbtYPHIVnpMAuKYZ scUnIVDzdAH+dOpi847C352tFhf4wYhp0PDJY7YnkClyAuXobENzOt08RqMKmN2JHj1O nvy6I1yz09L2wtJrHliq5xRZsdpG+unOuQnspsEfLNrEAyaGtlFZjwFJsXal6bF4IF9G kReA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=SuaJySZC+O9+w62KcNJbL2a4UHXqMdzSRrC7rv8ckO0=; b=uWgpS6QPSQUycJYfQclCFcy+1pFlo/SojselbanPyFs2fL9QL6xyGaiKYNDG/xPEG/ n/pf5EV/2VzDOZj74NOHx5OUDRG5jhi3UPHTguemneaTeKuKxwk0OJUz9ClJovqPQNmz JIugeuLuB+UslRuo99yeusmmIePYjrMJCffTncZSnVScSLRvcRp1VjpcZE/yNO6L5uoy IesjB98bW0V99D185ruEFVO8uwf6G/3uR4+DmaRKxNofZeGD9MQ9gmO2hGlknMX0oaik pAli6pUpaGQRJfHrUXN5b16gkU0Ye0X2tnEmIlf4QlIzyEpLpD4xq8AFJobD0FDusaq/ 7pIw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of daniel@braunwarth.dev designates 185.26.156.157 as permitted sender) smtp.mailfrom=daniel@braunwarth.dev Received: from bergelmir.uberspace.de (bergelmir.uberspace.de. [185.26.156.157]) by gmr-mx.google.com with ESMTPS id m18-20020adfdc52000000b002bfc35954dasi606911wrj.7.2023.01.30.03.35.47 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jan 2023 03:35:47 -0800 (PST) Received-SPF: pass (google.com: domain of daniel@braunwarth.dev designates 185.26.156.157 as permitted sender) client-ip=185.26.156.157; Received: (qmail 21445 invoked by uid 989); 30 Jan 2023 11:35:47 -0000 From: Daniel Braunwarth <daniel@braunwarth.dev> To: swupdate@googlegroups.com Cc: Daniel Braunwarth <daniel@braunwarth.dev>, Daniel Braunwarth <daniel.braunwarth@kuka.com> Subject: [swupdate] [PATCH 1/3] mongoose: gracefully handle broken pipe errors Date: Mon, 30 Jan 2023 12:35:08 +0100 Message-Id: <20230130113510.142836-2-daniel@braunwarth.dev> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230130113510.142836-1-daniel@braunwarth.dev> References: <20230130113510.142836-1-daniel@braunwarth.dev> MIME-Version: 1.0 X-Rspamd-Bar: ----- X-Rspamd-Report: R_MISSING_CHARSET(0.5) MIME_GOOD(-0.1) REPLY(-4) MID_CONTAINS_FROM(1) BAYES_HAM(-3) X-Rspamd-Score: -5.6 Received: from unknown (HELO unkown) (::1) by bergelmir.uberspace.de (Haraka/2.8.28) with ESMTPSA; Mon, 30 Jan 2023 12:35:47 +0100 X-Original-Sender: daniel@braunwarth.dev X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of daniel@braunwarth.dev designates 185.26.156.157 as permitted sender) smtp.mailfrom=daniel@braunwarth.dev Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
mongoose: gracefully handle broken pipe errors
|
expand
|
diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c index 465bd51..a5471cc 100644 --- a/mongoose/mongoose_interface.c +++ b/mongoose/mongoose_interface.c @@ -615,7 +615,7 @@ static void upload_handler(struct mg_connection *nc, int ev, void *ev_data, if (written != mp->part.body.len) { if (written < 0) { if (errno != EAGAIN && errno != EWOULDBLOCK) { - if ((mp->part.body.len + fus->len) == mp->len) { + if (errno == EPIPE || (mp->part.body.len + fus->len) == mp->len) { /* * Simply consumes the data to unblock the sender */