reset err value to SetDeadline return
Merge pull request #2551 from meirf/set-error-to-set-deadline-call

reset err value to SetDeadline return