Finally fixed long-standing deadlock in relay.go