fix crashes in connection when middleware raises and we expect it
Merge pull request #62 from reset/fix-connection-crashes

fix crashes in connection when middleware raises and we expect it