Skip to content

Commit

Permalink
Merge pull request #5 from alexkar598/master
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
tigercat2000 authored Mar 25, 2022
2 parents 1b9f1d6 + 3ef0fe9 commit 06c07c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "http2byond",
"description": "Communication layer between node.js and BYOND game servers.",
"version": "2.1.0",
"version": "2.1.1",
"scripts": {
"prepare": "npx tsc"
},
Expand Down
6 changes: 3 additions & 3 deletions src/http2byond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export function _sendTopic(socket: Socket, _topic: string): Promise<TopicReturnT
}
}

socket.once("error", errorHandler("Socket errored"))
socket.once("timeout", errorHandler("Connection timeout"))
socket.on("error", errorHandler("Socket errored"))
socket.on("timeout", errorHandler("Connection timeout"))

let byte = 0
//type(2) + length(2)
Expand All @@ -45,7 +45,7 @@ export function _sendTopic(socket: Socket, _topic: string): Promise<TopicReturnT
}


socket.once("data", data => {
socket.on("data", data => {
//Still waiting on a complete header
if(byte < 4) {
const copiedBytes = data.copy(headerBuffer)
Expand Down

0 comments on commit 06c07c9

Please sign in to comment.