port-serial: don't log force-closes if not really being forced close

Signed-off-by: Dan Williams <dan@ioncontrol.co>
This commit is contained in:
Dan Williams
2025-05-07 22:54:13 -05:00
parent 6f942f5774
commit c6d1a26a93
+2 -2
View File
@@ -1482,8 +1482,6 @@ port_serial_close_force (MMPortSerial *self)
if (self->priv->forced_close)
return;
mm_obj_dbg (self, "forced to close port");
/* Mark as having forced the close, so that we don't warn about incorrect
* open counts */
self->priv->forced_close = TRUE;
@@ -1493,6 +1491,8 @@ port_serial_close_force (MMPortSerial *self)
/* If already closed, done */
if (self->priv->open_count > 0) {
mm_obj_dbg (self, "forced to close port");
_close_internal (self, TRUE);
/* Notify about the forced close status */