golang-neo4j-bolt-driver
golang-neo4j-bolt-driver copied to clipboard
Fix for connectionNilOrClosed detects a fail in socket communication
This is a fix for reading a closed connection or failed connection, that must be reconnect, but with the older implementation, don't work.
Looking for "read([]byte{0})" that is used to identify a "stalled" connection, i found this Bug in Go: https://github.com/golang/go/issues/10940 and https://github.com/golang/go/issues/15735, and finally came to here https://github.com/go-sql-driver/mysql/blob/master/conncheck.go.
Looks like a much more robust way of resetting connections when they go idle.
I don't believe that this can be merged for copyright reasons. This project is MIT licensed, while the go-sql-driver code in question is MPL licensed.
The MPL requires that other code in the same files is also MPL or GPL.
To use that code, I think you need to do one of the following:
- Get permission of the original author of it to use it under the MIT license
- Re-license this project to be GPL or MPL
- Contain the MPL licensed portion in one package/file by itself, reference it from other files, distribute the MPL license in addition to the MIT license in this project (see their virality FAQ).
The 3rd option seems like it's the easiest to go with.
Usual internet disclaimer, I'm not a lawyer, this is not legal advice, etc etc.
Yikes. I didn't even notice the license difference.
Agree on the 3rd option being the easiest.