mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 11:44:53 +08:00
Merge pull request #75 from Konstantinacc/master
CloseHanle fd_ if SetCommState fails in function Serial::SerialImpl::reconfigurePort ().
This commit is contained in:
commit
c19a5a3cc9
@ -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