Skip to content

Commit 8ad72e3

Browse files
committed
Properly break in switch statement when closing stream
1 parent 157dcb8 commit 8ad72e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stream.ts

+2
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,14 @@ export class Stream extends Duplex {
138138
case STREAM_STATES.Established:
139139
this.state = STREAM_STATES.LocalClose;
140140
this.sendClose();
141+
break;
141142

142143
case STREAM_STATES.LocalClose:
143144
case STREAM_STATES.RemoteClose:
144145
this.state = STREAM_STATES.LocalClose;
145146
this.sendClose();
146147
this.session.closeStream(this.id);
148+
break;
147149
}
148150
}
149151

0 commit comments

Comments
 (0)