Reinitialize context when relay closes connection

Fixes #73