mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
CloseHanle fd_ if SetCommState fails in function Serial::SerialImpl::reconfigurePort ().
This commit is contained in:
parent
7de61c1603
commit
7bce3e0fdc
@ -242,6 +242,7 @@ Serial::SerialImpl::reconfigurePort ()
|
||||
|
||||
// activate settings
|
||||
if (!SetCommState(fd_, &dcbSerialParams)){
|
||||
CloseHandle(fd_);
|
||||
THROW (IOException, "Error setting serial port settings.");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user