~fnux/yggdrasil-go-coap

b4c07b449e056f199e7b98033261793dedd2548c — Axel Johnsson 2 years ago 4d60089
Switch order of operands in DTLS timeout calculation
1 files changed, 1 insertions(+), 1 deletions(-)

M net/connDTLS.go
M net/connDTLS.go => net/connDTLS.go +1 -1
@@ 97,7 97,7 @@ func (c *ConnDTLS) Read(b []byte) (n int, err error) {
	select {
	case d := <-c.readDataCh:
		return c.processData(b, d)
	case <-time.After(time.Now().Sub(deadline)):
	case <-time.After(deadline.Sub(time.Now())):
		return 0, errS{
			error:     fmt.Errorf(ioTimeout),
			temporary: true,