Skip to content

Commit e50b85b

Browse files
fix(TcpSource): subscribe to correct event
We're subscribing to the socket.finish event, but no such event exists according to the official NodeJS documentation. There is one called socket.end though, lets use that one. Closes #403
1 parent 022cf22 commit e50b85b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/components/tcp/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export class TcpSource extends Source {
6262
})
6363
// When closing a socket, indicate there is no more data to be sent,
6464
// but leave the outgoing stream open to check if more requests are coming.
65-
socket.on('finish', (e) => {
66-
console.warn('socket finished', e)
65+
socket.on('end', () => {
66+
console.warn('socket ended')
6767
incoming.push(null)
6868
})
6969
}

0 commit comments

Comments
 (0)