mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 19:55:48 +01:00
Prevent errors in log when there is a connection timeout (#2654)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
parent
e61db5a11a
commit
646640094a
@ -25,7 +25,6 @@ import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.ext.MessageBodyWriter;
|
||||
|
||||
import org.eclipse.jetty.io.EofException;
|
||||
import org.openhab.core.io.rest.JSONInputStream;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -90,7 +89,7 @@ public class GsonMessageBodyWriter<T> implements MessageBodyWriter<T> {
|
||||
// Keep this code as it has been present before,
|
||||
// but I don't think this needs to be done in the message body writer itself.
|
||||
entityStream.flush();
|
||||
} catch (EofException e) {
|
||||
} catch (IOException e) {
|
||||
// we catch this exception to avoid confusion errors in the log file, since this is not any error situation
|
||||
// see https://github.com/openhab/openhab-distro/issues/1188
|
||||
logger.debug("Failed writing HTTP response, since other side closed the connection");
|
||||
|
Loading…
Reference in New Issue
Block a user