Skip to content

Commit

Permalink
Fix timeout event (#22)
Browse files Browse the repository at this point in the history
* Update LICENSE.md

* Update CHANGELOG.md

* Fix timeout event

* Bump version

* Update CHANGELOG.md

* Update nodejs.yml
  • Loading branch information
hcodes committed Oct 28, 2023
1 parent 5622a8d commit 12b02d3
Show file tree
Hide file tree
Showing 6 changed files with 2,665 additions and 2,116 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 5.0.0
- Drop support Node.js < 16.
- Fix timeout event.
- Update dev deps in package.json.

## 4.1.0
Add error codes for export #6.

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

© 2020 Denis Seleznev, <hcodes@yandex.ru>
© 2023 Denis Seleznev, <hcodes@yandex.ru>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
Expand Down
3 changes: 1 addition & 2 deletions lib/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ function post(params, callback) {
});

req.on('timeout', function() {
req.abort();
callback(Error(ETIMEDOUT));
req.destroy(Error(ETIMEDOUT));
});

req.write(form);
Expand Down
Loading

0 comments on commit 12b02d3

Please sign in to comment.