You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is Issue 2 moved from a Google Code project.
Added by 2012-05-21T08:15:55.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Defect, Priority-High, OpSys-Windows
Original description
<b>What steps will reproduce the problem?</b>
1. on Windows
2. Query
<b>3.</b>
<b>What is the expected output? What do you see instead?</b>
expected output: success
actual output: driver: bad connection
<b>What version of the product are you using? On what operating system?</b>
<b>Please provide any additional information below.</b>
Suggested fix:
line 52 of packets.go
n, e := mc.netconn.Read(data)
if e != nil || n != int(pktLen) {
e = driver.ErrBadConn
}
Here, we assume Read only return when the data is filled. But at least on Go Windows version, it will return prematurely.
So maybe we can change the code to
n, e := mc.netconn.Read(data)
na := 0
for e == nil && n < int(pktLen) {
na, e = mc.netconn.Read(data[n:])
n += na
}
I've verified it on Windows, it works.
The text was updated successfully, but these errors were encountered:
* add RejectReadOnly
* update README.md
* close connection explicitly before returning ErrBadConn for 1792 (#2)
* add test and improve doc
* doc/comment changes
This is Issue 2 moved from a Google Code project.
Added by 2012-05-21T08:15:55.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Defect, Priority-High, OpSys-Windows
Original description
The text was updated successfully, but these errors were encountered: