Skip to content

Remove unnecessary code, originally for checking for disconnects when using non-overlapped I/O #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions serial_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,6 @@ func (port *windowsPort) Read(p []byte) (int, error) {
return 0, nil
}
}

// At the moment it seems that the only reliable way to check if
// a serial port is alive in Windows is to check if the SetCommState
// function fails.

params := &dcb{}
getCommState(port.handle, params)
if err := setCommState(port.handle, params); err != nil {
port.Close()
return 0, err
}
}
}

Expand Down