improves event handler and ssl error handling

fixes broken error response

(0) -100 -30 -10 -2 +2 +10 +30 +100 +300 tip

mercurial