Don't terminate noiseLoop when noise.AcceptHandshake fails.
commiteb02a9b657437fad61849466f25f216d41fb9a92
authorDavid Fifield <david@bamsoftware.com>
Wed, 16 Feb 2022 19:13:13 +0000 (16 12:13 -0700)
committerDavid Fifield <david@bamsoftware.com>
Wed, 16 Feb 2022 19:13:13 +0000 (16 12:13 -0700)
tree5c3123c26c9284f9503e20f750a5616795d4e81d
parentc26df2f8c973aac807d9903b312bdf47932295d2
Don't terminate noiseLoop when noise.AcceptHandshake fails.

AcceptHandshake can fail for reasons as simple as a message being
incorrectly formatted. We only want to exit this main processing loop
when an unrecoverable error occurs.

Before this change, a client could cause a server to stop processing
messages by sending it a message consisting only of "\x01". noiseLoop
would exit with:
noise: message is too short
champa-server/main.go