The compat socket getter should probably have a bit more null checks in order to be compat with old code:
i.e.
get socket() {
return this.stream && this.stream.session && this.stream.session.socket || undefined;
}
instead of
get socket() {
return this.stream.session.socket;
}
@apapirovski